Aims: The aim of this study is to investigate the association between adherence to beta-blocker treatment after a first acute myocardial infarction (AMI) and long-term risk of heart failure (HF) and death. Methods and results: All patients admitted for a first AMI included in the nationwide Swedish web-system for enhancement and development of evidence-based care in heart disease evaluated according to recommended therapies register between 2005 and 2010 were eligible (n = 71 638). After exclusion of patients who died in-hospital, patients with previous HF, patients with unknown left ventricular ejection fraction (EF), and patients who died during the first year after the index event, 38 608 patients remained in the final analysis. Adherence to prescribed beta-blockers was determined for 1 year after the index event using the national registry for prescribed drugs and was measured as proportion of days covered, the ratio between the numbers of days covered by the dispensed prescriptions and number of days in the period. As customary, a threshold level for proportion of days covered ≥80% was used to classify patients as adherent or non-adherent. At discharge 90.6% (n = 36 869) of all patients were prescribed a beta-blocker. Among 38 608 1 year survivors, 31.1% (n = 12 013) were non-adherent to beta-blockers. Patients with reduced EF without HF and patients with HF with reduced EF were more likely to remain adherent to beta-blockers at 1 year compared with patients with normal EF (NEF) without HF. Being married/cohabiting and having higher income level, hypertension, ST-elevation MI, and percutaneous coronary intervention were associated with better adherence. Adherence was independently associated with lower all-cause mortality [hazard ratio (HR) 0.77, 95% confidence interval [CI] 0.71–0.84] and a lower risk for the composite of HF readmission/death, (HR 0.83, 95% CI 0.78–0.89, P value <0.001) during the subsequent 4 years of follow up. These associations were favourable but less apparent in patients with HFNEF and NEF. Conclusions: Nearly one in three AMI patients was non-adherent to beta-blockers within the first year. Adherence was independently associated with improved long-term outcomes; however, uncertainty remains for patients with HFNEF and NEF.