Participation in exercise-based cardiac rehabilitation (exCR) increases aerobic capacity and improves outcomes in patients following myocardial infarction (MI) and is therefore universally recommended. While meta-analyses consistently report that participation in exCR reduces cardiovascular mortality, there are conflicting results regarding effects on total mortality. Presently, many eligible patients do not receive exCR in clinical practice. We aimed to investigate the relation between participation in exCR post-MI and total mortality in men and women in a nationwide real-world cohort from the SWEDEHEART registry. Longitudinal, observational cohort study. In total, 20 895 patients from the SWEDEHEART registry were included. Mortality data were obtained from the Swedish National Population Registry. During a mean of 4.55 (±2.33) years of follow-up, 1000 patients died. Using Cox regression for proportional odds and taking a wide range of potential confounders into consideration, participation in exCR was related to significantly lower total mortality [hazard ratio (HR) 0.72, 95% confidence interval 0.62-0.83]. Excluding patients with shorter follow-up than 2 years did not alter the results. Exercise-based CR participation was related to lowered total mortality in most of the investigated subgroups. The risk reduction was more pronounced in women than in men (HR 0.54 vs. 0.81, respectively). Participation in exCR was associated with reduced total mortality, and more pronounced in women, compared with men. Our results further support the recommendations to participate in exCR, and hence we argue that exCR should be a mandatory part of comprehensive CR programmes, offered to all patients post-MI.