Musculoskeletal conditions, including fractures, can have severe and long-lasting consequences. Higher body mass index in adulthood is widely acknowledged to be protective for most fracture sites. However, sources of bias induced by confounding factors may have distorted previous findings. Employing a lifecourse Mendelian randomisation (MR) approach by using genetic instruments to separate effects at different life stages, this investigation aims to explore how prepubertal and adult body size independently influence fracture risk in later life.Using data from a large prospective cohort, univariable and multivariable MR were conducted to simultaneously estimate the effects of age-specific genetic proxies for body size (n = 453,169) on fracture risk (n = 416,795). A two-step MR framework was additionally applied to elucidate potential mediators. Univariable and multivariable MR indicated strong evidence that higher body size in childhood reduced fracture risk (OR, 95% CI: 0.89, 0.82 to 0.96, P = 0.005 and 0.76, 0.69 to 0.85, P = 1 × 10− 6, respectively). Conversely, higher body size in adulthood increased fracture risk (OR, 95% CI: 1.08, 1.01 to 1.16, P = 0.023 and 1.26, 1.14 to 1.38, P = 2 × 10− 6, respectively). Two-step MR analyses suggested that the effect of higher body size in childhood on reduced fracture risk was mediated by its influence on higher estimated bone mineral density (eBMD) in adulthood.This investigation provides novel evidence that higher body size in childhood reduces fracture risk in later life through its influence on increased eBMD. From a public health perspective, this relationship is complex since obesity in adulthood remains a major risk factor for co-morbidities. Results additionally indicate that higher body size in adulthood is a risk factor for fractures. Protective effect estimates previously observed are likely attributed to childhood effects.Supplementary InformationThe online version contains supplementary material available at 10.1007/s10654-023-00986-6.