Human cytomegalovirus (HCMV) infection is associated with neuropathology in patients with impaired immunity and/or inflammatory diseases. However, the association between gray matter volume (GMV) and HCMV has never been examined in major depressive disorder (MDD) despite the presence of inflammation and impaired viral immunity in a subset of patients. We tested this relationship in two independent samples consisting of 179 individuals with MDD and 41 healthy controls (HC) (sample 1) and 124 MDD participants and 148 HCs (sample 2). HCMV positive (HCMV+) and HCMV negative (HCMV-) groups within each sample were balanced on up to 11 different clinical/demographic variables using inverse probability of treatment weighting. GMV of 87 regions was measured with FreeSurfer. There was a main effect of HCMV serostatus but not diagnosis that replicated across samples. Relative to HCMV- subjects, HCMV+ subjects in sample 1 showed a significant reduction of volume in six regions (puncorrected < 0.05). The reductions in GMV of the right supramarginal gyrus (standardized beta coefficient (SBC) = −0.26) and left fusiform gyrus (SBC = −0.25) in sample 1 were replicated in sample 2: right supramarginal gyrus (puncorrected < 0.05, SBC = −0.32), left fusiform gyrus (PFDR < 0.01, SBC = −0.51). Posthoc tests revealed that the effect of HCMV was driven by differences between the HCMV+ and HCMV- MDD subgroups. HCMV IgG level, a surrogate marker of viral activity, was correlated with GMV in the left fusiform gyrus (r = −0.19, Puncorrected = 0.049) and right supramarginal gyrus (r = −0.19, puncorrected = 0.043) in the HCMV+ group of sample 1. Conceivably, HCMV infection may be a treatable source of neuropathology in vulnerable MDD patients.