We found that a neuron-specific isoform of LSD1, LSD1n, which results from an alternative splicing event, acquires a new substrate specificity, targeting histone H4 Lys20 methylation, both in vitro and in vivo. Selective genetic ablation of LSD1n led to deficits in spatial learning and memory, revealing the functional importance of LSD1n in neuronal activity-regulated transcription that is necessary for long-term memory formation. LSD1n occupied neuronal gene enhancers, promoters and transcribed coding regions, and was required for transcription initiation and elongation steps in response to neuronal activity, indicating the crucial role of H4K20 methylation in coordinating gene transcription with neuronal function. Our results indicate that this alternative splicing of LSD1 in neurons, which was associated with altered substrate specificity, serves as a mechanism acquired by neurons to achieve more precise control of gene expression in the complex processes underlying learning and memory.