Pre-operative exercise therapy improves outcomes for many patients who undergo surgery. Despite the well-known effects on tolerance to systemic perturbation, the mechanisms by which pre-operative exercise protects the organ that is operated on from inflammatory injury are unclear. Here, we show that four-week aerobic pre-operative exercise significantly attenuates liver injury and inflammation from ischaemia and reperfusion in mice. Remarkably, these beneficial effects last for seven more days after completing pre-operative exercising. We find that exercise specifically drives Kupffer cells toward an anti-inflammatory phenotype with trained immunity via metabolic reprogramming. Mechanistically, exercise-induced HMGB1 release enhances itaconate metabolism in the tricarboxylic acid cycle that impacts Kupffer cells in an NRF2-dependent manner. Therefore, these metabolites and cellular/molecular targets can be investigated as potential exercise-mimicking pharmaceutical candidates to protect against liver injury during surgery.