This study examined the association between coffee consumption and all-cause mortality in patients with a prior acute myocardial infarction or unstable angina. Data were from the prospective study ERICO, totalising 928 patients with Acute Coronary Syndrome (ACS). During 4 years’ follow-up, a total of 111 deaths occurred. Moderate coffee consumption (1-2 and 2-3 cups/day) was inversely associated with total mortality (HR 0.13, 95% CI: 0.06-0.29 and 0.22, 95% CI: 0.13-0.39, respectively). For patients with higher coffee consumption (>3 cups/day), there was a positive association with mortality (HR 2.12, 95% CI: 1.06-4.24). After stratification by smoking status, the analysis revealed lower risk of mortality in never and former smokers, drinking 1-2 and 2-3 cups/day. Among current smokers there was a positive association between >3 cups/day and mortality. The moderate consumption of coffee was associated with lower risk of all-cause mortality in patients with a prior ACS, particularly in non-smokers.