Converging evidence indicates that epigenetic mechanisms are involved in drug addiction, and that enzymes involved in chromatin remodeling may represent interesting targets in addiction treatment. No study has addressed whether histone deacetylase (HDAC) inhibitors (HDACi) can reduce excessive ethanol intake or prevent relapse in alcohol‐dependent animals. Here, we assessed the effects of two HDACi, sodium butyrate (NaB) and MS‐275, in the operant ethanol self‐administration paradigm in dependent and non‐dependent rats. To characterize some of the epigenetic mechanisms associated with alcohol dependence and NaB treatment, we measured the levels of histone H3 acetylation in different brain areas of dependent and non‐dependent rats, submitted or not to NaB treatment. Our results demonstrated that (1) NaB and MS‐275 strongly decreased excessive alcohol intake of dependent rats in the operant ethanol self‐administration paradigm but not of non‐dependent rats; (2) NaB reduced excessive drinking and prevented the escalation of ethanol intake in the intermittent access to 20% ethanol paradigm; and (3) NaB completely blocked the increase of ethanol consumption induced by an alcohol deprivation, thus demonstrating a preventive effect of NaB on relapse. The mapping of cerebral histone H3 acetylation revealed a hyperacetylation in the amygdala and cortical areas in dependent rats. Interestingly, NaB did not exacerbate the hyperacetylation observed in these regions, but instead restored it, specifically in cortical areas. Altogether, our results clearly demonstrated the efficacy of NaB in preventing excessive ethanol intake and relapse and support the hypothesis that HDACi may have a potential use in alcohol addiction treatment.