The results showed that the following were all reversed by EE treatment: maternal SD (MSD)‐induced cognitive deficits including spatial learning and memory; histone acetylation dysfunction including increased histone deacetylase 2 (HDAC2) and decreased histone acetyltransferase (CBP), and the acetylation levels of H3K9 and H4K12; synaptic plasticity dysfunction including decreased brain‐derived neurotrophic factor; and postsynaptic density protein‐95. Here, HDAC2 is linked to cognition.