The aim of the present study was to investigate the prevalence of musculoskeletal pain in patients with type 2 diabetes mellitus (T2DM) in association with 25-hydroxyvitamin D levels, anxiety, depression and neuropathy. A cross-sectional study was conducted involving a total of 124 T2DM patients. Musculoskeletal pain was determined by self-reporting of painful body sites. Pain intensity was assessed using a scale of 0-10. Anxiety and depression were assessed using the Hospital Anxiety and Depression Scale. Neuropathy was assessed using the PainDETECT questionnaire. The concentration of 25-hydroxyvitamin D was measured using liquid chromatography-tandem mass spectrometry. Fasting blood sugar (FBS) was determined using the hexokinase method and glycated hemoglobin (HbA1c) level was determined using turbidimetric inhibition immunoassay. The neck, lower back and head were reported as the most common painful sites (affected in 60.5, 60.5 and 56.5% of patients, respectively). Pain in the lower extremities, including the knees, lower legs and feet, was more common compared with pain in the upper extremities. The pain measurements of number of painful sites and pain intensity did not differ significantly among patients with sufficient (>30 ng/ml), insufficient (20-30 ng/ml) and deficient (<20 ng/ml) vitamin D levels (P>0.05). The pain measurements were identified to have no correlation with age, body mass index, FBS, HbA1c level, 25-hydroxyvitamin D concentration, anxiety or depression (P>0.05). However, the pain measurements were correlated with duration of T2DM and neuropathy score (P<0.05). Further regression analysis demonstrated that the pain measurements were significantly associated with the neuropathy score (P<0.05). In conclusion, musculoskeletal pain in patients with T2DM was not associated with 25-hydroxyvitamin D concentration, but was associated with neuropathy score. This may encourage further investigations to assess the etiology of musculoskeletal pain in T2DM, and whether vitamin D supplementation and management of neuropathy would be of value as pain relief treatment.