Marijuana has been used for thousands of years as a treatment for medical conditions. However, untoward side effects limit its medical value. Here, we show that synaptic and cognitive impairments following repeated exposure to Δ9-tetrahydrocannabinol (Δ9-THC) are associated with the induction of cyclooxygenase-2 (COX-2), an inducible enzyme that converts arachidonic acid to prostanoids in the brain. COX-2 induction by Δ9-THC is mediated via CB1 receptor-coupled G protein βγ subunits. Pharmacological or genetic inhibition of COX-2 blocks downregulation and internalization of glutamate receptor subunits and alterations of the dendritic spine density of hippocampal neurons induced by repeated Δ9-THC exposures. Ablation of COX-2 also eliminates Δ9-THC-impaired hippocampal long-term synaptic plasticity, spatial, and fear memories. Importantly, the beneficial effects of decreasing β-amyloid plaques and neurodegeneration by Δ9-THC in Alzheimer’s disease animals are retained in the presence of COX-2 inhibition. These results suggest that the applicability of medical marijuana would be broadened by concurrent inhibition of COX-2.