Abstract Background Diabetes mellitus (DM) is a factor of increased mortality in patients with acute myocardial infarction (AMI). DM is also associated with a higher risk of heart failure (HF) in patients with coronary artery disease as in the general population. The aim of the present study was to assess the incidence of HF developing at the acute stage of MI and of HF occurring in the year following hospital discharge, according to presence of DM. We also assessed the association between DM, HF and long-term mortality in this AMI population. Methods We used the French administrative hospital-discharge database, including all patients without history of HF admitted for AMI between 2010 and 2019 (n=797,212, mean age 69 years, 66% male). Among them, 520,258 patients (65%) had ST-segment elevation myocardial infarction (STEMI), 276,954 (35%) had non-STEMI, 192,456 patients (24%) had a history of DM. Occurrence of HF during the initial hospital stay was analysed in the whole population. In patients without HF during the index hospitalisation, discharged and alive at day 8 (n=535,813), we collected all hospitalisations for HF occurring during the year after discharge and analysed subsequent long-term mortality in those alive at one year (n=270,534) (length of follow-up 2.0±2.5 years, median 0.9, IQR 0.1–3.5). Results Overall, DM patients were older than non-DM patients (71±12 vs 67±15 years) and had more frequent comorbidities. At the acute stage, DM was associated with a higher risk of HF (28.7% vs 20.5% adjusted OR 1.40, 1.38–1.42, p<0.0001). In patients without HF at the acute stage and discharged alive at day 8, DM was associated with a higher risk of being hospitalised with HF in the first year (5.6% vs 2.8%, adjusted HR 1.52, 1.49–1.56, p<0.0001). In patients alive at one year, rates of all-cause death per year during subsequent follow-up were 2.2% in those without DM or HF during the first year (reference), 3.4% in those with DM and no HF during the first year (adjusted HR 1.22, 1.18–1.25, p<0.0001), 7.7% in those without DM and with HF during the first year (adjusted HR 1.92, 1.83–2.02, p<0.0001) and 8.9% in those with DM hospitalised with HF during the first year (adjusted HR 2.23, 2.09–2.37, p<0.0001) (see figure). Conclusion After AMI, patients with diabetes are at increased risk of heart failure both at the acute stage and in the year following myocardial infarction, compared with non-diabetic patients. Non-fatal HF developing in the year following discharge is associated with noticeably higher subsequent mortality, and the combination of DM and HF is particularly at risk. Improved management is needed in diabetic patients following an AMI to avoid development of heart failure and its longer-term consequences. Funding Acknowledgement Type of funding sources: None.