Background Serum vitamin D levels have been reported to be associated with individual components of body composition. However, the relationship between serum vitamin D and combined indices of adverse body composition is largely unknown. This cross-sectional study examined the association between serum vitamin D and osteosarcopenic obesity in a nationally representative sample of middle-aged and older adults. Methods We analysed the Korea National Health and Nutrition Examination Surveys (IV and V) conducted in 2008-2010, consisting of 5908 (2485 men, 3423 women) aged 50years. Serum vitamin D levels were determined by radioimmunoassay, and body composition was evaluated by dual-energy x-ray absorptiometry. The association between serum vitamin D levels and the number of abnormalities in body composition, including osteosarcopenic obesity, a low bone and muscle mass with concurrent high fat mass, was analysed by multinomial logistic regression adjusting for covariates. Results In men, after controlling for covariates, higher vitamin D levels were associated with a significantly reduced likelihood of the number of phenotypes of adverse body composition (P for trend<0.05). Those in the highest tertile group of serum vitamin D levels, compared with those in the lowest tertile, were less likely to have adverse body composition, numbering one (odds ratio [OR]=0.67, 95% confidence interval [CI]: 0.49, 0.92), two (OR=0.49, 95% CI: 0.33, 0.73), and three (osteosarcopenic obesity; OR=0.42, 95% CI: 0.26, 0.67). In women, those in the highest tertile group of serum vitamin D levels, compared with those in the lowest tertile, were less likely to have osteosarcopenic obesity (OR=0.55, 95% CI: 0.33, 0.93). Vitamin D deficiency (<20ng/mL) in men was significantly associated with an increased likelihood of a higher number of adverse body composition, especially for osteosarcopenic obesity (OR=2.08, 95% CI: 1.42, 3.03). Vitamin D deficient women, compared with those having normal levels of serum vitamin D, were also more likely to demonstrate osteosarcopenic obesity (OR=1.99, 95% CI: 1.30, 3.05). Conclusions A high serum vitamin D level in mid- and late-life was associated with reduced odds of multiple adverse body composition, especially osteosarcopenic obesity, suggesting potential health benefits of maintaining adequate levels of vitamin D.