Obsessive–compulsive disorder (OCD) is a chronic and disabling psychiatric condition whose neurobiological underpinnings remain incompletely characterized. A growing body of evidence suggests that vitamin D, through its modulatory actions on neuroinflammation, serotonin synthesis and cortico-striato-thalamo-cortical circuitry, may be implicated in its clinical expression. The present cross-sectional study examined the association between serum 25-hydroxyvitamin D levels and OCD severity in 306 adult outpatients with a diagnosis of OCD, of whom 173 had vitamin D measurements available. Symptom severity was assessed through the Yale–Brown Obsessive–Compulsive Scale (Y-BOCS), and associations were examined using non-parametric tests, partial correlations and multivariable linear regression adjusted for age, gender, age at onset and bipolar comorbidity. Mean vitamin D was 20.0 ± 13.1 ng/mL, with 60.1% of patients meeting criteria for deficiency. Lower vitamin D levels correlated inversely with Y-BOCS total score (ρ = −0.26, p = 0.001) and with both subscales, and deficient patients showed a mean Y-BOCS total approximately 5.5 points higher than non-deficient ones. In multivariable models, lower vitamin D (β = −0.253, p = 0.001) and earlier age at onset (β = −0.278, p = 0.001) independently predicted greater severity (R² = 0.133), while a history of suicide attempts neither predicted severity nor moderated the vitamin D association. These findings support vitamin D status as a biological correlate of OCD severity and warrant longitudinal and interventional investigation.