Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript. The mechanisms that extend lifespan in humans are poorly understood. Here we show that extended longevity in humans is associated with a distinct transcriptome signature in the cerebral cortex that is characterized by downregulation of genes related to neural excitation and synaptic function. In Caenorhabditis elegans, neural excitation increases with age and inhibition of excitation globally, or in glutamatergic or cholinergic neurons, increases longevity. Furthermore, longevity is dynamically regulated by the excitatory–inhibitory balance of neural circuits. The transcription factor REST is upregulated in humans with extended longevity and represses excitation-related genes. Notably, REST-deficient mice exhibit increased cortical activity and neuronal excitability during ageing. Similarly, loss-of-function mutations in the C. elegans REST orthologue...