Neuroimaging studies have indicated abnormalities in cortico-striato-thalamo-cortical circuits in obsessive–compulsive disorder patients, but results have not been consistent. Since there are significant sex differences in human brain anatomy and obsessive–compulsive symptomatology and its developmental trajectories tend to be distinct in males and females, we investigated whether sex is a potential source of heterogeneity in neuroimaging studies on obsessive–compulsive symptoms. We selected male and female twin pairs who were concordant for scoring either high or low for obsessive–compulsive symptoms and a group of discordant pairs where one twin scored high and the co-twin scored low. The design included 24 opposite-sex twin pairs. Magnetic resonance imaging scans of 31 males scoring high for obsessive–compulsive symptoms, 41 low-scoring males, 58 high-scoring females, and 73 low-scoring females were analyzed and the interaction of obsessive–compulsive symptoms by sex on gray matter volume was assessed using voxel-based morphometry. An obsessive–compulsive symptom by sex interaction was observed for the left middle temporal gyrus, the right middle temporal gyrus, and the right precuneus. These interactions acted to reduce or hide a main effect in our study and illustrate the importance of taking sex into account when investigating the neurobiology of obsessive–compulsive symptoms.