Coordinated changes in gene expression are critical for synaptic plasticity supporting learning, memory, and optimal cognitive task performance. These gene expression changes are not only mediated by signaling pathways that activate transcription factors, but also by chromatin modifications that influence the accessibility of the transcriptional machinery to specific genomic regions. During the past decade, evidence accumulated that alterations in chromatin-based epigenetic regulation of gene expression are linked to cognitive dysfunctions in the ageing or neurodegenerating brain as well as to cognitive dysfunctions resulting from chronic stress exposure. This review summarizes the results of studies that unraveled a role of histone modifying enzymes and histone modifications in normal and impaired learning and memory, and in the disruption of executive cognitive task performance. It emphasizes the different roles of specific class I histone deacetylases (HDACs) in cognitive processes governed by the hippocampus and prefrontal cortex and discusses the potential therapeutic implications of targeting them to hold the progression of disease-related cognitive dysfunctions.