The development of obsessive‒compulsive disorder (OCD), a common psychiatric disorder with multiple dimensions, is closely related to parenting styles. Theoretical studies suggest that perfectionism may play a mediating role, but this has not been confirmed in patients with varied OCD symptoms, and the differences in the roles of positive and negative perfectionism remain unknown. The aim of this study was to investigate the mediating role of perfectionism between parenting styles and various obsessive‒compulsive symptoms in patients with OCD. A total of 181 patients with OCD and 138 healthy controls completed questionnaires measuring obsessive-compulsive symptoms, parenting styles, and perfectionism. The results revealed a positive correlation between negative perfectionism scores and negative parenting style scores, with higher scores predicting more severe obsessive‒compulsive symptoms. Negative perfectionism mediated the relationship between negative parenting styles and obsessive‒compulsive symptoms. In contrast, the mediating role of positive perfectionism was not significant. These findings elucidate the mechanisms underlying the occurrence of various obsessive‒compulsive symptoms and offer new ideas for OCD interventions. These results suggest that perfectionism may play an important role in the relationship between obsessive‒compulsive symptoms and parenting styles, shedding light on possible mechanisms behind obsessive‒compulsive symptoms, and offering possible treatment targets.