Abstract Background Overweight and obesity are risk factors for type 2 diabetes (T2D) with a cumulative effect. However, individuals experience important variation throughout life. We aimed to identify life-course trajectories of changes in weight categories among men and women and their association with T2D. Methods 4,820 women and 3,128 men participants of the Stockholm Diabetes Preventive Program (1992-2017) provided self-reported weight status at age 7 and 18, BMI 10 and 5 years before the study and measured BMI at baseline. Exposure was categorized as low weight, normal weight and high weight. Diagnosis of T2D was assessed with an oral glucose tolerance tests (OGTT) or taken from inpatient and outpatient registries. The life course trajectories were estimated using latent group mixture models, risk of T2D and population attributable fractions with Poisson regression. Results We found five trajectories in women and men: stable normal (44.8%, 34.2%), low increasing (17.4%, 18.7%), high in early adulthood (18.6%, 27.8%), high in late adulthood (14.7%, 14.5%), and stable high (4.5%, 4.5%). Compared to stable normal, the risk of T2D was higher in the low increasing (RR: 1.4 (95%CI: 1.0-2.0), RR:1.54(95%CI: 1.0-2.2)), high in early adulthood ((RR: 2.79 (95%CI: 2.1-3.7), RR: 2.8 (95%CI: 2.0-3.6)), high in late adulthood ((RR: 1.6 (95%CI: 1.1-2.2), RR: 1.6 (95%CI: 1.1-2.3)) and stable high groups ((RR: 2.9 (95%CI: 1.9-4.3), RR: 2.7 (95%CI 1.8-4.0)), and 48.2% (95% CI: 36.3% - 57.8%) of the cases of T2D in women and 41.2% (95%CI: 27.4% - 52.3%) in men could have been avoided if participants had been in the stable normal group. PAF was higher for the high in early adulthood group -25.5% (19%-31%) and (27.2% (19%-35%)-. Conclusions We identified five life course trajectories of changes in weight status. Risk of T2D was greater in the stable high and high in early adulthood groups but the proportion of T2D cases that can be attributed to the high in early adulthood group was greater. Key messages Different life-course trajectories of high body weight are associated to the risk of diabetes in late adulthood. The largest proportion of cases of T2D can be attributed to weight gain in early adulthood.