Introduction and objectives Noninvasive ventilation (NIV) has been shown to reduce the rate of endotracheal intubation and mortality in patients with acute heart failure (AHF). However, patients with AHF secondary to acute coronary syndrome/acute myocardial infarction (ACS-AMI) have been excluded from many clinical trials. The purpose of this study was to compare the effectiveness of NIV between patients with AHF triggered by ACS-AMI and by other etiologies. Methods Prospective cohort study of all patients with AHF treated with NIV admitted to the intensive care unit for a period of 20 years. Patients were divided according to whether they had ACS-AMI as the cause of the AHF episode. NIV failure was defined as the need for endotracheal intubation or death. Results A total of 1009 patients were analyzed, 403 (40%) showed ACS-AMI and 606 (60%) other etiologies. NIV failure occurred in 61 (15.1%) in the ACS-AMI group and in 64 (10.6%) in the other group (P = .031), without differences in in-hospital mortality (16.6% and 14.9%, respectively; P = .478). Conclusions The presence of ACS-AMI as the triggering cause of AHF did not influence patients with acute respiratory failure requiring noninvasive respiratory support .