Cognitive decline is a debilitating feature of most neurodegenerative diseases of the central nervous system, including Alzheimer's disease. The causes leading to such impairment are only poorly understood and effective treatments are slow to emerge. Here we show that cognitive capacities in the neurodegenerating brain are constrained by an epigenetic blockade of gene transcription that is potentially reversible. This blockade is mediated by histone deacetylase 2, which is increased by Alzheimer's-disease-related neurotoxic insults in vitro, in two mouse models of neurodegeneration and in patients with Alzheimer's disease. Histone deacetylase 2 associates with and reduces the histone acetylation of genes important for learning and memory, which show a concomitant decrease in expression. Importantly, reversing the build-up of histone deacetylase 2 by short-hairpin-RNA-mediated knockdown unlocks the repression of these genes, reinstates structural and synaptic plasticity, and abolishes neurodegeneration-associated memory impairments. These findings advocate for the development of selective inhibitors of histone deacetylase 2 and suggest that cognitive capacities following neurodegeneration are not entirely lost, but merely impaired by this epigenetic blockade.