Restricted and repetitive behavior (RRB) is a primary symptom of autism spectrum disorder (ASD), which poses a significant risk to individuals' health and is becoming increasingly prevalent. However, the specific cellular and neural circuit mechanisms underlying the generation of RRB remain unclear. In this study, it is reported that the absence of the ASD‐related protein Neuroligin 1 (NLGN1) in dopamine receptor D2‐expressing medium spiny neurons (D2‐MSNs) in the dorsal striatum is associated with the duration and frequency of self‐grooming and digging behaviors. The Nlgn1‐deficient D2‐MSNs are hyperactivated, which correlates with excessive self‐grooming and digging behaviors. Inhibiting the activity of D2‐MSNs reduces the duration and frequency of these RRBs. Furthermore, it is demonstrated that the generation of self‐grooming and digging behaviors depends on distinct patterns of D2‐MSN activity. Finally, through single‐nucleus RNA sequencing (sn‐RNAseq) and protein detection verification, it is revealed that the overactivation of protein kinase C (PKC) in Nlgn1‐deficient mice contributes to excessive repetitive behaviors and increased neuronal excitability. In this study, potential mechanisms are proposed for the generation of self‐grooming and digging behaviors, as well as suggest possible treatments and interventions ASD.