The Warburg effect, which originally described increased production of lactate in cancer, is associated with diverse cellular processes such as angiogenesis, hypoxia, polarization of macrophages and activation of T cells. This phenomenon is intimately linked to several diseases including neoplasia, sepsis and autoimmune diseases1,2. Lactate, which is converted from pyruvate in tumour cells, is widely known as an energy source and metabolic by-product. However, its non-metabolic functions in physiology and disease remain unknown. Here we show that lactate-derived lactylation of histone lysine residues serves as an epigenetic modification that directly stimulates gene transcription from chromatin. We identify 28 lactylation sites on core histones in human and mouse cells. Hypoxia and bacterial challenges induce the production of lactate by glycolysis, and this acts as a precursor that stimulates histone lactylation. Using M1 macrophages that have been exposed to bacteria as a model system, we show that histone lactylation has different temporal dynamics from acetylation. In the late phase of M1 macrophage polarization, increased histone lactylation induces homeostatic genes that are involved in wound healing, including Arg1. Collectively, our results suggest that an endogenous 'lactate clock' in bacterially challenged M1 macrophages turns on gene expression to promote homeostasis. Histone lactylation thus represents an opportunity to improve our understanding of the functions of lactate and its role in diverse pathophysiological conditions, including infection and cancer.