Epigenetic modifications have emerged as key contributors to the enduring behavioral and molecular neuroadaptations following withdrawal from chronic alcohol exposure. Here, we investigated in C57/BL mice whether repeated daily injections of baclofen, a γ-aminobutyric acid (GABA) type B receptor (GABAB-R) agonist, administrated during the withdrawal period could prevent deficits in working memory and associated changes of the transcriptionally repressive mark dimethylated histone H3 lysine 9 (H3K9me2) in the dorsal hippocampus and the prefrontal cortex. We found that mice subjected to a 4-week withdrawal period after 5 months of alcohol consumption exhibit persistent deficits in spatial working memory and abnormal decreases in global levels of H3K9me2 immunoreactivity in both regions. Importantly, baclofen treatment during the 15 days preceding the end of alcohol withdrawal reversed working memory impairments and led to full reversal of the withdrawal-induced decreased levels of H3K9me2 in both regions. In addition, baclofen also reversed the withdrawal-induced aberrant decrease of permissive histone H3 lysine 9 acetylation (H3K9ac) in the dorsal hippocampus. Conversely, administration of UNC0642, a pharmacological inhibitor of the lysine methyltransferase G9a-mediated H3K9me2, prior to testing blocked the preventive effect of baclofen on withdrawal-induced working memory impairment. Together, these results suggested that, after prolonged alcohol withdrawal, downregulation of GABAB-R function may mediate long-lasting working memory impairment via downregulation of H3K9me2 and G9a activity in the dorsal hippocampus and prefrontal cortex.