Despite the well-established regulatory role of vitamin D in maintaining bone health, little is known about the shared genetics and causality of the association between serum 25-hydroxyvitamin D (25OHD) and bone mineral density (BMD). Leveraging individual-level data from the UK Biobank (UKB) cohort and summary-level data from the genome-wide association studies (GWASs) conducted on European individuals for serum 25OHD (N = 417,580) and estimated heel BMD (eBMD, N = 426,824), we systematically elucidated the shared genetic architecture underlying serum 25OHD and eBMD through a comprehensive genome-wide cross-trait design. Despite a lack of global genetic correlation (rg = -0.001, P = 0.95), a significant local signal was discovered at 5p11-5q11.9. Two-sample Mendelian randomization (MR) indicated no causal association in the overall population (β = 0.003, 95% CI = -0.04∼0.03, P = 0.93), while positive causal effects were observed in males (β = 0.005, 95% CI = 0.00∼0.01, P = 0.03) and the elderly (β = 0.009, 95% CI = 0.00∼0.02, P = 0.01) according to one-sample MR. A total of 49 pleiotropic SNPs, with 4 novel SNPs (rs1077151, rs79873740, rs12150353, and rs4760401), were identified, and a total of 95 gene-tissue pairs exhibited overlap, predominantly enriched in the nervous, digestive, exo-/endocrine and cardiovascular systems. Protein-protein interaction analysis identified RPS9 and RPL7A as hub genes. This study illuminates the potential health benefits of enhancing serum 25OHD levels to mitigate the risk of osteoporosis among males and the elderly. It also unveils a shared genetic basis between serum 25OHD and eBMD, offering valuable insights into the intricate biological pathways.