AimsPrevious observational studies have reported potential associations among attention-deficit/hyperactivity disorder (ADHD), obesity, and diabetes (including type 1 and type 2 diabetes mellitus [T1DM/T2DM]). However, whether the association between ADHD and diabetes is mediated by obesity is unknown.MethodsWith two-sample Mendelian randomization, we analysed the causal effect of ADHD on T1DM and T2DM and six obesity-related traits [including body mass index, waist circumference (WC), hip circumference, waist-to-hip ratio (WHR), body fat percentage and basal metabolic rate] and the causal effect of these obesity-related traits on T1DM/T2DM. Finally, with multivariable Mendelian randomization, we explored and quantified the possible mediation effects of obesity-related traits on the causal effect of ADHD on T1DM/T2DM.ResultsOur results showed that ADHD increased the risk of T2DM by 14% [odds ratio (OR) = 1.140, 95% confidence interval (CI) = 1.005–1.293] but with no evidence of an effect on T1DM (OR = 0.916, 95% CI = 0.735–1.141,P= 0.433.). In addition, ADHD had a 6.1% increased causal effect on high WC (OR = 1.061, 95% CI = 1.024–1.099,P= 0.001) and an 8.2% increased causal effect on high WHR (OR = 1.082, 95% CI = 1.035–1.131,P= 0.001). In addition, a causal effect of genetically predicted high WC (OR = 1.870, 95% CI = 1.594–2.192,P< 0.001) on a higher risk of T2DM was found. In further analysis, WC mediated approximately 26.75% (95% CI = 24.20%–29.30%) of the causal association between ADHD and T2DM.ConclusionsWC mediates a substantial proportion of the causal effect of ADHD on the risk of T2DM, which indicated that the risk of T2DM induced by ADHD could be indirectly reduced by controlling WC as a main risk factor.