Purpose To examine whether low-density lipoprotein cholesterol (LDL-C) levels influence the cardiovascular risk associated with non-aspirin non-steroidal anti-inflammatory drug (NSAID) use after myocardial infarction (MI). Methods Using Danish health registries, we conducted a population-based cohort study of all adult patients with first-time MI during 2010–2020 with an LDL-C value before discharge. Based on the latest LDL-C value, we categorized patients into a low and a high LDL-C group (<3.0 vs. ≥3.0 mmol/L). We used time varying Cox regression to compute hazard ratios (HRs) with 95% confidence intervals of the association between NSAID use and a major adverse cardiovascular event (MACE: recurrent MI, ischemic stroke, and all-cause death). Results We followed 50,573 patients for a median of 3.1 years. While exposed, 521 patients experienced a MACE: 312 in the low LDL-C group and 209 in the high LDL-C group. The HRs for MACE comparing NSAID use with non-use were 1.21 (1.11–1.32) overall, 1.19 (1.06–1.33) in the low LDL-C group, and 1.23 (1.07–1.41) in the high LDL-group. The HRs for recurrent MI and ischemic stroke were comparable between the LDL-C subgroups. The HRs for all-cause death were 1.22 (1.07–1.39) in the low LDL-C group and 1.54 (1.30–1.83) in the high LDL-C group. Changing the cut-off value for LDL-C to 1.8 and 1.4 mmol/L showed consistent results. Conclusion In patients with MI, LDL-C levels did not influence the increased risk of MACE associated with NSAID use, but might influence the association between NSAID use and all-cause death.