Obsessive-compulsive disorder (OCD) is a deliberating disorder with complex genetic and environmental etiologies. Hypotheses about OCD mainly include dysregulated neurotransmitters, especially serotonin, and disturbed neurodevelopment. Single nucleotide polymorphism (SNP) association studies regarding OCD are often met with inconsistent results. However, stratification by age of onset may sometimes help to limit the heterogenicity of OCD patients. Therefore, we conducted a stratified SNP association study enrolling 636 patients and 612 healthy controls. Patients were stratified by age of onset as early-onset (EO-OCD) and late-onset (LO-OCD). Blood extracted from the patients was used to genotype 18 loci, including serotonin system genes, Slitrk1, Slitrk5, and DMRT2 and related miRNA genes. Logistic regression was used to compare allele and genotype frequencies of variants. A general linear model was used to evaluate the association between variants and trait anxiety. In our study, rs3824419 in DMRT2 was associated with EO-OCD, G allele was the risk allele. Rs2222722 in miR-30a-5p was associated with EO-OCD, with the C allele being the risk allele. Rs1000952 in HTR3D was found associated with trait anxiety in OCD patients. The significance disappeared after FDR correction. Our results supported neurodevelopment-related genes, DMRT2 and miR-30a-5p, to be related to EO-OCD. However, we cannot prove serotonin genes to be directly associated with EO-OCD. While an association between HTR3D and trait anxiety was discovered, comparisons based on biological or clinical traits may be helpful in future studies. As our detective powers were limited, more large-scale studies will be needed to confirm our conclusion.