To investigate the mechanism of cyclooxygenase 2 (COX2) in learning and memory impairments in rats subjected to chronic unpredictable mild stress (CUMS), meloxicam was used intragastrically to inhibit the activity of cyclooxygenase 2. Moreover, cyclooxygenase 2 over-expressing or RNA interfere lentivirus was injected intraventricularly to increase or decrease the enzyme's expression, respectively. The body weights and sucrose consumption were used to analyze depressive behaviors, while the Morris water maze and step-down-type passive avoidance tests were carried out to evaluate the learning-memory functions. The levels of inflammatory cytokines were measured to estimate inflammation and the contents of cyclic adenosine monophosphate (cAMP) were used to measure the levels of the second messenger. Changes in cyclooxygenase 2 mRNA levels were analyzed using reverse transcription polymerase chain reaction. Moreover, the expression of cyclooxygenase 2, brain-derived neurotrophic factor (BDNF), prostaglandins receptor 3 (EP3), protein kinase A (PKA), cAMP response element binding protein (CREB), and phosphorylated CREB were estimated using immunohistochemical staining or western blotting. The results showed that CUMS led to significant depressive-like behaviors and learning and memory dysfunctions. Also, the cAMP levels decreased significantly, while levels of inflammatory cytokines and prostaglandins E2 increased significantly. The expressions of PKA, BDNF, phosphorylated CREB/CREB declined and cyclooxygenase 2 was increased. Meloxicam and cyclooxygenase 2 RNA interfere lentivirus reversed the changes caused by CUMS while cyclooxygenase 2-overexpressing lentivirus worsened these abnormalities. The findings also showed that CUMS increased cyclooxygenase 2 expression, which can cause learning and memory impairments, mainly through activating the hippocampal neuronal cAMP/PKA-CREB-BDNF signaling pathways.