BackgroundThe effects on bone mineral density (BMD)/fracture between type 1 (T1D) and type 2 (T2D) diabetes are unknown. Therefore, we aimed to investigate the causal relationship between the two types of diabetes and BMD/fracture using a Mendelian randomization (MR) design.MethodsA two-sample MR study was conducted to examine the causal relationship between diabetes and BMD/fracture, with three phenotypes (T1D, T2D, and glycosylated hemoglobin [HbA1c]) of diabetes as exposures and five phenotypes (femoral neck BMD [FN-BMD], lumbar spine BMD [LS-BMD], heel-BMD, total body BMD [TB-BMD], and fracture) as outcomes, combining MR-Egger, weighted median, simple mode, and inverse variance weighted (IVW) sensitivity assessments. Additionally, horizontal pleiotropy was evaluated and corrected using the residual sum and outlier approaches.ResultsThe IVW method showed that genetically predicted T1D was negatively associated with TB-BMD (β = -0.018, 95% CI: -0.030, -0.006), while T2D was positively associated with FN-BMD (β = 0.033, 95% CI: 0.003, 0.062), heel-BMD (β = 0.018, 95% CI: 0.006, 0.031), and TB-BMD (β = 0.050, 95% CI: 0.022, 0.079). Further, HbA1c was not associated with the five outcomes (β ranged from − 0.012 to 0.075).ConclusionsOur results showed that T1D and T2D have different effects on BMD at the genetic level. BMD decreased in patients with T1D and increased in those with T2D. These findings highlight the complex interplay between diabetes and bone health, suggesting potential age-specific effects and genetic influences. To better understand the mechanisms of bone metabolism in patients with diabetes, further longitudinal studies are required to explain BMD changes in different types of diabetes.