Aims/hypothesisDetermining how high BMI at different time points influences the risk of developing type 2 diabetes and affects insulin secretion and insulin sensitivity is critical.MethodsBy estimating childhood BMI in 441,761 individuals in the UK Biobank, we identified which genetic variants had larger effects on adulthood BMI than on childhood BMI, and vice versa. All genome-wide significant genetic variants were then used to separate the independent genetic effects of high childhood BMI from those of high adulthood BMI on the risk of type 2 diabetes and insulin-related phenotypes using Mendelian randomisation. We performed two-sample MR using external studies of type 2 diabetes, and oral and intravenous measures of insulin secretion and sensitivity.ResultsWe found that a childhood BMI that was one standard deviation (1.97 kg/m2) higher than the mean, corrected for the independent genetic liability to adulthood BMI, was associated with a protective effect for seven measures of insulin sensitivity and secretion, including increased insulin sensitivity index (β=0.15; 95% CI 0.067, 0.225;p=2.79×10−4) and reduced fasting glucose levels (β=−0.053; 95% CI −0.089, −0.017;p=4.31×10−3). However, there was little to no evidence of a direct protective effect on type 2 diabetes (OR 0.94; 95% CI 0.85, 1.04;p=0.228) independently of genetic liability to adulthood BMI.Conclusions/interpretationOur results provide evidence of the protective effect of higher childhood BMI on insulin secretion and sensitivity, which are crucial intermediate diabetes traits. However, we stress that our results should not currently lead to any change in public health or clinical practice, given the uncertainty regarding the biological pathway of these effects and the limitations of this type of study.Graphical AbstractSupplementary InformationThe online version of this article (10.1007/s00125-023-05923-6) contains peer-reviewed but unedited supplementary material.