Non-selective histone deacetylase (HDAC) inhibitors reduce cognitive impairment in animal models of neurodegenerative disease. Here, the authors investigated which specific HDAC mediates this effect. In a mouse model of Alzheimer's disease, HDAC2 levels were increased in CA1 and prefrontal cortex. HDAC2 was specifically enriched in genes involved in learning and memory or synaptic plasticity. Accordingly, these genes showed hypoacetylation and reduced expression. HDAC2 knockdown reversed these changes and restored synaptic plasticity and hippocampus-dependent memory performance. These findings point to HDAC2 as a target for the treatment of neurodegeneration-related cognitive impairments.