Glutamate induces Ca2+ influx in neurons through NMDA receptors (NMDARs) and consequently activates protein kinases, including CaMKII, which plays critical roles in postsynaptic functions and learning. However, how CaMKII regulates learning remains largely unknown. Here, we show that NMDA-induced activation of the CaMKII-RhoA-Rho-kinase pathway regulates aversive learning through Shank3 phosphorylation. We performed phosphoproteomics to identify CaMKII substrates and found that CaMKII phosphorylated ArhGEF2 (RhoGEF) and stimulated its RhoGEF activity downstream of NMDAR. Aversive stimuli induced CaMKII-mediated ArhGEF2 phosphorylation and Rho-kinase/ROCK activation in the nucleus accumbens (NAc). Inhibition of Rho-kinase in dopamine D2 receptor (D2R)-expressing medium spiny neurons (MSNs) in the NAc attenuated aversive learning. We also found that Rho-kinase phosphorylated Shank3 and increased its interaction with NMDAR and AMPA receptors. Manipulation of Shank3 in D2R-MSNs regulated dendritic spine morphology and aversive learning in a phosphorylation-dependent manner. These results demonstrated that NMDA-induced phosphorylation of Shank3 via the CaMKII-Rho-kinase pathway regulates aversive learning.