Acute coronary syndrome (ACS), heart failure (HF) and obstructive sleep apnea (OSA) often overlap and interact, the impact of OSA on ACS patients with HF remains unclear. The study sought to comprehensively evaluate the effects of the interaction between OSA and HF on long-term cardiovascular outcomes in ACS patients. Between June 2015 and January 2020, patients hospitalized for ACS were prospectively enrolled and underwent portable sleep monitoring after clinically stabilization. OSA was defined as an apnea hypopnea index ≥15 events/h. HF was defined using medical records. The primary endpoint was major adverse cardiovascular and cerebrovascular event (MACCE), including death, myocardial infarction, stroke, ischemia-driven revascularization, and hospitalization for unstable angina. Among all 1927 included patients, 214 (11.1%) had HF, and 1014 (52.6%) had OSA. For 2.9 years (1.5, 3.6 years) follow-up, OSA was independently associated with the risk of MACCE in HF patients (adjusted hazard ratio [HR], 2.11; 95%CI, 1.16-3.84; P=0.014), but not in those without HF (adjusted HR, 1.15; 95%CI, 0.92-1.45; P=0.228). Further analysis showed OSA exerted more prognostic effect in HF patients with preserved eject fraction (adjusted HR, 2.45; 95% CI, 1.11-5.41; P=0.027) than those with reduced eject fraction (adjusted HR, 1.62; 95% CI, 0.63-4.20; P=0.319). In the settings of ACS, OSA was independently associated with poor prognosis in patients with concomitant HF especially those with persevered ejection fraction. Screening and treatment for OSA are highly recommended in ACS patients with HF. URL: www.clinicaltrails.gov; Unique Identifier: NCT03362385.