Relatively little is known about the mechanisms that preserve memories during long-term storage. The authors found that neural activation during learning triggers long-lasting transcription of a specific neurexin-1 splice isoform, enabling retention of hippocampus-dependent memory. This process was mediated by signaling through the AMPK pathway leading to histone modifications.