Exposure to adverse childhood experiences (ACE) increases the risk of adult physical and mental health disorders, including obsessive-compulsive disorder (OCD), and influences adult cortical neural responses and gray matter (GM) volumes. Robust neuroimaging findings associated OCD with corticostriatal dysfunction and with abnormal morphology and metabolism of cortical areas and basal ganglia. We explored the GM correlates of ACE in 40 patients with OCD (15 drug-naive and 25 drug-treated patients) with magnetic resonance imaging voxel-based morphometry at 3.0 T. Regional GM volumes were the dependent variable, and drug treatment (naive vs treated) and breadth of exposure to ACE (high vs low) were the factors of interest. Sex, duration of illness, and handedness were considered as nuisance covariates. Whole brain statistical threshold was P < 0.05 familywise error corrected for multiple comparisons. Patients with higher levels of exposure to ACE showed increased GM volume in the head of the left caudate nucleus. Ongoing drug treatment was associated with reduced GM volume in the same area. Earlier age at onset of OCD, need for medication treatment, and mixed handedness were correlated with higher levels of ACE. Exposure to ACE increased, and ongoing drug treatment decreased, caudate GM in OCD. Increased volume and metabolism of the caudate nucleus have been consistently associated with OCD. Our findings suggest a detrimental effect of ACE on the brain underpinnings of OCD, with an opposite effect of medications.