Obsessive-compulsive disorder (OCD) is a mental affliction characterized by compulsive behaviors often manifested in intrusive thoughts and repetitive actions. The quinpirole model has been used with rats to replicate compulsive behaviors and study the neurophysiological processes associated with this pathology. Several changes in the dendritic spines of the medial prefrontal cortex (mPFC) and dorsolateral striatum (DLS) have been related to the occurrence of compulsive behaviors. Dendritic spines regulate excitatory synaptic contacts, and their morphology is associated with various brain pathologies. The present study was designed to correlate the occurrence of compulsive behaviors (generated by administering the drug quinpirole) with the morphology of the different types of dendritic spines in the mPFC and DLS. A total of 18 male rats were used. Half were assigned to the experimental group, the other half to the control group. The former received injections of quinpirole, while the latter rats were injected with physiological saline solution, for 10 days in both cases. After the experimental treatment, the quinpirole rats exhibited all the parameters indicative of compulsive behavior and a significant correlation with the density of stubby and wide neckless spines in both the mPFC and DLS. Dendritic spines from both mPFC and DLS neurons showed plastic changes correlatively with the expression of compulsive behavior induced by quinpirole. Further studies are suggested to evaluate the involvement of glutamatergic neurotransmission in the neurobiology of OCD.