The Warburg effect is a hallmark of cancer that refers to the preference of cancer cells to metabolize glucose anaerobically rather than aerobically1,2. This results in substantial accumulation of lacate, the end product of anaerobic glycolysis, in cancer cells3. However, how cancer metabolism affects chemotherapy response and DNA repair in general remains incompletely understood. Here we report that lactate-driven lactylation of NBS1 promotes homologous recombination (HR)-mediated DNA repair. Lactylation of NBS1 at lysine 388 (K388) is essential for MRE11–RAD50–NBS1 (MRN) complex formation and the accumulation of HR repair proteins at the sites of DNA double-strand breaks. Furthermore, we identify TIP60 as the NBS1 lysine lactyltransferase and the ‘writer’ of NBS1 K388 lactylation, and HDAC3 as the NBS1 de-lactylase. High levels of NBS1 K388 lactylation predict poor patient outcome of neoadjuvant chemotherapy, and lactate reduction using either genetic depletion of lactate dehydrogenase A (LDHA) or stiripentol, a lactate dehydrogenase A inhibitor used clinically for anti-epileptic treatment, inhibited NBS1 K388 lactylation, decreased DNA repair efficacy and overcame resistance to chemotherapy. In summary, our work identifies NBS1 lactylation as a critical mechanism for genome stability that contributes to chemotherapy resistance and identifies inhibition of lactate production as a promising therapeutic cancer strategy.