The temporal coding of action potential activity is fundamental to nervous system function. Here we consider how gene expression in neurons is regulated by specific patterns of action potential firing, with an emphasis on new information on epigenetic regulation of gene expression. Patterned action potential activity activates intracellular signaling networks selectively in accordance with the kinetics of activation and inactivation of second messengers, phosphorylation and dephosphorylation of protein kinases, and cytoplasmic and nuclear calcium dynamics, which differentially activate specific transcription factors. Increasing evidence also implicates activity-dependent regulation of epigenetic mechanisms to alter chromatin architecture. Changes in three-dimensional chromatin structure, including chromatin compaction, looping, double-stranded DNA breaks, histone and DNA modification, are altered by action potential activity to selectively inhibit or promote transcription of specific genes. These mechanisms of activity-dependent regulation of gene expression are important in neural development, plasticity, and in neurological and psychological disorders.