The high-mobility group box 1 (HMGB1) protein has a central role in immunological antitumour defense. Here we show that natural killer cell-derived HMGB1 directly eliminates cancer cells by triggering metabolic cell death. HMGB1 allosterically inhibits the tetrameric pyruvate kinase isoform M2, thus blocking glucose-driven aerobic respiration. This results in a rapid metabolic shift forcing cells to rely solely on glycolysis for the maintenance of energy production. Cancer cells can acquire resistance to HMGB1 by increasing glycolysis using the dimeric form of PKM2, and employing glutaminolysis. Consistently, we observe an increase in the expression of a key enzyme of glutaminolysis, malic enzyme 1, in advanced colon cancer. Moreover, pharmaceutical inhibition of glutaminolysis sensitizes tumour cells to HMGB1 providing a basis for a therapeutic strategy for treating cancer.