The neuropeptide oxytocin (OXT) has been implicated in the pathophysiology of behavioural deficits among patients with autism spectrum disorder (ASD). However, the molecular mechanisms underlying its role in ASD remain unclear. In the present study, a murine model with ASD-like phenotypes was induced by intra-medial amygdala injection of N-methyl-d-aspartate, and it was used to investigate the role of OXT in behaviour regulation. Behavioural tests were performed to verify the ASD-like phenotypes of N-methyl-d-aspartate-treated mice, and the results showed that mice with bilateral medial amygdala lesions presented significant behavioural deficits, including impaired learning and memory and increased anxiety and depression. We also observed a notably decreased level of OXT in both the plasma and the hypothalamus of medial amygdala-lesioned mice, and the extracellular signal-regulated kinase (ERK) was activated. Further studies demonstrated that the administration of OXT alleviated ASD-like symptoms and significantly inhibited phosphorylation of ERK; the inhibitory effect was similar to that of U0126, an ERK signalling inhibitor. In addition, OXT administration modulated the expression of downstream proteins of the ERK signalling pathway, such as cyclic adenosine monophosphate response element binding and c-fos. Taken together, our data indicate that OXT plays an important role in ameliorating behavioural deficits in an ASD-like mouse model, which was mediated by inhibiting the ERK signalling pathway and its downstream proteins.