PurposeData on long-term mortality among patients with hospital-diagnosed overweight/obesity are limited. Thus, we aim to examine 40-year mortality among patients with hospital-diagnosed overweight/obesity, including cause-specific deaths, secular time trends, and potential effect modification by age, comorbidity, and socioeconomic factors.Patients and MethodsFrom national registries, we identified all Danes with a first hospital-based overweight/obesity diagnosis (N=331,185), 1979–2018, and constructed an age- and gender-matched general population comparison cohort (N=1,655,925). We computed mortality rates (MRs) per 1000 person-years and adjusted mortality rate ratios (aMRRs) with 95% confidence intervals (CIs), using Cox regression with adjustment for comorbidities and educational level. We performed stratified analyses on age, comorbidities, and socioeconomic factors.ResultsThe overall aMRR was 1.70 (95% CI: 1.68–1.72) for patients with overweight/obesity, mainly due to diabetes and other endocrine diseases (aMRR=2.68 [95% CI: 2.57–2.81]), cardiovascular (aMRR=1.95 [95% CI: 1.91–1.98]), and respiratory diseases (aMRR=1.83 [95% CI: 1.77–1.89]). The 1–10-year aMRR decreased from 2.06 (95% CI: 2.01–2.11) in 1979–1989 to 1.29 (95% CI: 1.26–1.32) in 2000–2009. We found effect modification by age: age 18 to <30 years: aMRR=2.44 (95% CI: 2.24–2.66) vs age ≥70 years: 1.35 (95% CI: 1.33–1.37); comorbidities: baseline comorbidities: aMRR=1.13 (95% CI: 1.10–1.15) vs no comorbidities: aMRR=1.83 (95% CI: 1.80–1.85); and educational level: high educational level: aMRR=1.81 (95% CI: 1.74–1.88) vs low educational level: aMRR=1.70 (95% CI: 1.67–1.72).ConclusionPatients with overweight/obesity had a substantially increased long-term mortality, mainly due to diabetes, cardiovascular, and respiratory diseases. The excess mortality decreased during recent decades. Age, comorbidities, and socioeconomic factors modified the association.