NMDA receptors promote neuronal survival but also cause cell degeneration and neuron loss. The mechanisms underlying these opposite effects on neuronal fate are unknown. Whole-genome expression profiling revealed that NMDA receptor signaling is decoded at the genomic level through activation of two distinct, largely nonoverlapping gene-expression programs. The location of the NMDA receptor activated specifies the transcriptional response: synaptic NMDA receptors induce a coordinate upregulation of newly identified pro-survival genes and downregulation of pro-death genes. Extrasynaptic NMDA receptors fail to activate this neuroprotective program, but instead induce expression of Clca1, a putative calcium-activated chloride channel that kills neurons. These results help explain the opposing roles of synaptic and extrasynaptic NMDA receptors on neuronal fate. They also demonstrate that the survival function is implemented in neurons through a multicomponent system of functionally related genes, whose coordinate expression is controlled by specific calcium signal initiation sites.