Emerging evidence suggests that epigenetic regulation is dependent on metabolic state, and implicates specific metabolic factors in neural functions that drive behaviour1. In neurons, acetylation of histones relies on the metabolite acetyl-CoA, which is produced from acetate by chromatin-bound acetyl-CoA synthetase 2 (ACSS2)2. Notably, the breakdown of alcohol in the liver leads to a rapid increase in levels of blood acetate3, and alcohol is therefore a major source of acetate in the body. Histone acetylation in neurons may thus be under the influence of acetate that is derived from alcohol4, with potential effects on alcohol-induced gene expression in the brain, and on behaviour5. Here, using in vivo stable-isotope labelling in mice, we show that the metabolism of alcohol contributes to rapid acetylation of histones in the brain, and that this occurs in part through the direct deposition of acetyl groups that are derived from alcohol onto histones in an ACSS2-dependent manner. A similar direct deposition was observed when mice were injected with heavy-labelled acetate in vivo. In a pregnant mouse, exposure to labelled alcohol resulted in the incorporation of labelled acetyl groups into gestating fetal brains. In isolated primary hippocampal neurons ex vivo, extracellular acetate induced transcriptional programs related to learning and memory, which were sensitive to ACSS2 inhibition. We show that alcohol-related associative learning requires ACSS2 in vivo. These findings suggest that there is a direct link between alcohol metabolism and gene regulation, through the ACSS2-dependent acetylation of histones in the brain.