NMDA receptors play dual and opposing roles in neuronal survival by mediating the activity‐dependent neurotrophic signaling and excitotoxic cell death via synaptic and extrasynaptic receptors, respectively. In this study, we demonstrate that the aryl hydrocarbon receptor (AhR), also known as the dioxin receptor, is involved in the expression and the opposing activities of NMDA receptors. In primary cultured cortical neurons, we found that NMDA excitotoxicity is significantly enhanced by an AhR agonist 2,3,7,8‐tetrachlorodibenzo‐p‐dioxin, and AhR knockdown with small interfering RNA significantly reduces NMDA excitotoxicity. AhR knockdown also significantly reduces NMDA‐increases intracellular calcium concentration, NMDA receptor expression and surface presentation, and moderately decreases the NMDA receptor‐mediated spontaneous as well as miniature excitatory post‐synaptic currents. However, AhR knockdown significantly enhances the bath NMDA application– but not synaptic NMDA receptor‐induced brain‐derived neurotrophic factor (BDNF) gene expression, and activating AhR reduces the bath NMDA‐induced BDNF expression. Furthermore, AhR knockdown reveals the calcium dependency of NMDA‐induced BDNF expression and the binding activity of cAMP‐responsive element binding protein (CREB) and its calcium‐dependent coactivator CREB binding protein (CBP) to the BDNF promoter upon NMDA treatment. Together, our results suggest that AhR opposingly regulates NMDA receptor‐mediated excitotoxicity and neurotrophism possibly by differentially regulating the expression of synaptic and extrasynaptic NMDA receptors.