AimThe present study examined the microbiome abundance and composition of drug‐naive or drug‐free patients with obsessive‐compulsive disorder (OCD) compared with healthy controls. In addition, in the OCD group, the microbiome composition was compared between early‐onset and late‐onset OCD.MethodsSerum samples were collected from 89 patients with OCD and 107 age‐ and sex‐matched healthy controls. Bacterial DNA was isolated from bacteria‐derived extracellular vesicles in serum and then amplified and quantified using primers specific to the V3‐V4 hypervariable region of the 16S ribosomal RNA gene. The 16S ribosomal DNA gene amplicon sequencing was performed.ResultsThe pooled estimate showed that α‐diversity was significantly reduced in patients with OCD compared with that in healthy controls (PShannon = 0.00015). In addition, a statistically significant difference was observed in β‐diversity between patients with OCD and healthy controls at the order (P = 0.012), family (P = 0.003), genus (P < 0.001), and species (P = 0.005) levels. In the microbiome composition, Pseudomonas, Caulobacteraceae (f), Streptococcus, Novosphingobium, and Enhydrobacter at the genus level were significantly less prevalent in patients with OCD than in controls. In addition, among patients with OCD, the microbial composition in the early‐onset versus late‐onset types was significantly different with respect to the genera Corynebacterium and Pelomonas.ConclusionThe present study showed an aberrant microbiome in patients with OCD, suggesting a role of the microbiota‐brain interaction in the pathophysiology of OCD. Further longitudinal studies with larger sample sizes adjusting for various confounders are warranted.