The impairments of cognitive flexibility associated with the prefrontal lobe dysfunction are increasingly recognized as one of the major components in the etiology, pathophysiology of depression and antidepressive treatment. With recent strategies of behavioral modeling of depression supporting expansion beyond “pure” depression domains, experimental models based on targeting these plus cognitive domains represent further important directions of research. Although social defeat stress has been widely used as a model of depression, the effects of social defeat on cognitive flexibility are still unclear. It has been shown that the interactions between monoaminergic system and prefrontal cortex are involved in the modulation of cognitive flexibility. However, it remains uncertain which downstream molecular events affected by neurotransmitters are critical to their effects on cognitive function. The present study aims to investigate the effects of social defeat stress and ERK signal pathway in prefrontal cortex on cognitive flexibility of rats. Firstly, we established a social defeat stress model and examined the effect of social defeat on different cognitive components in Attentional Set-shifting Task (AST), a model adapted from human-based cognitive task, called Wisconsin Card Sorting Test (WCST). Secondly, the expressions of extracellular signal-regulated kinase (ERK), cAMP response components combined with protein (CREB) and brain derived neurotrophic factor (BDNF) in prefrontal cortex were determined using Western Blotting assay. Finally, the effects of ERK signaling inhibitor administered either in medial prefrontal cortex (mPFC) or in orbitofrontal cortex (OFC) on cognitive flexibility and the levels of CREB and BDNF were examined. The results showed that: (1) Social defeat stress induced deficits of cognitive flexibility, characterized by the impairment of reversal learning (REL) and extra-dimension shifting (EDS) in AST. The stressed rats showed a significant increase in the trials to criterion and the errors to criterion in REL and EDS compared to non-stressed rats. Morever, the number of REL trials was significantly correlated with the number of defeated behaviors in stressed rats. A further analysis of error rate showed that the perseveration to previous relevant dimension could contribute to the impairment of EDS performance induced by social stress. (2) Social defeat exerted differential effects on ERK1/2 proteins and their phosphorylation levels in the different sub-regions of prefrontal cortex. Stress only induced a decrease in ERK2 signal transduction in mPFC, while more extensive decrease in both ERK1 and pERK1/2 expression in OFC. Social defeat stress downregulated the phosphorylation of CREB (pCREB) and BDNF expression both in OFC and mPFC. (3) ERK inhibitor injected into OFC led to a reduction of pERK2 and the impairment of EDS, but the levels of pCREB and BDNF were not changed. (4) ERK inhibitor injected into mPFC led to a reduction of pERK2, but had no effects on cognitive flexibility and the expression of pCREB and BDNF. These results indicated that social defeat stress induced cognitive disturbances both in REL and EDS. The different effects of Stress and pharmaceutical treatment on cognitive functions and signal molecules suggested that ERK exerted complex effects on different cognitive components depending on the places of action. CREB and BDNF had a consistent response to stress and drug treatment, but different from ERK. Further studies are needed to identify the effects of above proteins on stress-induced cognitive impairment and upstream signaling molecules. All these findings promote the understanding on potential signaling pathway underlying stress-induced deficits of cognitive function.