Background Coronary microvascular dysfunction and obstruction (CMVO) is a strong predictor of a poor prognosis in patients with ST-segment elevation myocardial infarction (STEMI). Although research has suggested that obstructive sleep apnea (OSA) exacerbates CMVO after primary percutaneous coronary intervention, data supporting a correlation between OSA and CMVO are limited. This study was performed to investigate whether OSA is associated with CMVO, detected as microvascular obstruction on cardiovascular magnetic resonance images, in patients with STEMI. Methods Patients ( N = 249) with a first STEMI underwent primary percutaneous coronary intervention. CMVO was evaluated on cardiovascular magnetic resonance images based on the presence of microvascular obstruction. OSA was classified into four levels of severity based on the respiratory event index (REI): absent (REI of <5), mild (REI of ≥5 to <15), moderate (REI of ≥15 to <30) and severe (REI of ≥30). Results The REI was significantly higher in the presence of microvascular obstruction ( n = 139) than in its absence ( n = 110) (REI of 12.8 vs. 10.7, respectively; p = 0.023). Microvascular obstruction was observed in 42%, 58%, 57% and 70% of patients in the absent, mild, moderate and severe OSA groups, respectively. Multiple logistic regression analysis showed that severe OSA was associated with increased odds of microvascular obstruction (odds ratio (OR), 5.10; 95% confidence interval (CI),1.61–16.2; p = 0.006). Mild and moderate OSA were also associated with increased odds of microvascular obstruction (mild OSA: OR, 2.88; 95% CI, 1.19–7.00; p = 0.019 and moderate OSA: OR, 3.79; 95% CI, 1.43–10.1; p = 0.008). Conclusion Severe OSA was associated with CMVO after primary percutaneous coronary intervention in patients with STEMI.