BackgroundObesity is often accompanied by lower 25(OH)D levels, whereas these two parameters exhibit opposite effects on bone health. It is uncertain what are the effects of lower 25(OH)D levels in obesity on bone health in elderly Chinese people.MethodsA nationally representative cross-sectional analysis of China Community-based Cohort of Osteoporosis (CCCO) was performed from 2016 to 2021, which consisted of 22,081 participants. Demographic data, disease history, Body mass index (BMI), bone mineral density (BMD), the levels of the biomarkers of vitamin D status and those of bone metabolism markers were measured for all participants (N = 22,081). The genes (rs12785878, rs10741657, rs4588, rs7041, rs2282679 and rs6013897) related to 25(OH)D transportation and metabolism were performed in a selected subgroup (N = 6008).ResultsObese subjects exhibited lower 25(OH)D levels (p < 0.05) and higher BMD (p < 0.001) compared with those of normal subjects following adjustment. The genotypes and allele frequency of rs12785878, rs10741657, rs6013897, rs2282679, rs4588 and rs7041 indicated no significant differences among three BMI groups following correction by the Bonferroni’s method (p > 0.05). The levels of total 25(OH)D (ToVD) were significantly different among the GC1F, GC1S and GC2 haplotype groups (p < 0.05). Correlation analysis indicated that ToVD levels were significantly correlated with parathyroid hormone levels, BMD, risk of osteoporosis (OP) and the concentration levels of other bone metabolism markers (p < 0.05). Generalized varying coefficient models demonstrated that the increasing BMI, ToVD levels and their interactions were positively associated with BMD outcomes (p < 0.001), whereas the reduced levels of ToVD and BMI increased the risk of OP, which was noted notably for the subjects with reduced ToVD levels (less than 20.69 ng/ml) combined with decreased BMI (less than 24.05 kg/m2).ConclusionThere was a non-linear interaction of BMI and 25(OH)D. And higher BMI accompanied by decreased 25(OH)D levels is associated with increased BMD and decreased incidence of OP, optimal ranges exist for BMI and 25(OH)D levels. The cutoff value of BMI at approximately 24.05 kg/m2combined with an approximate value of 25(OH)D at 20.69 ng/ml are beneficial for Chinese elderly subjects.