Patients with low fitness as assessed by cardiopulmonary exercise testing (CPET) have higher mortality and morbidity after surgery. Preoperative exercise intervention, or prehabilitation, has been suggested as a method to improve CPET values and outcomes. This trial sought to assess the capacity of a 4-week supervised exercise programme to improve fitness before liver resection for colorectal liver metastasis. This was a randomized clinical trial assessing the effect of a 4-week (12 sessions) high-intensity cycle, interval training programme in patients undergoing elective liver resection for colorectal liver metastases. The primary endpoint was oxygen uptake at the anaerobic threshold. Secondary endpoints included other CPET values and preoperative quality of life (QoL) assessed using the SF-36®. Thirty-eight patients were randomized (20 to prehabilitation, 18 to standard care), and 35 (25 men and 10 women) completed both preoperative assessments and were analysed. The median age was 62 (i.q.r. 54-69) years, and there were no differences in baseline characteristics between the two groups. Prehabilitation led to improvements in preoperative oxygen uptake at anaerobic threshold (+1·5 (95 per cent c.i. 0·2 to 2·9) ml per kg per min) and peak exercise (+2·0 (0·0 to 4·0) ml per kg per min). The oxygen pulse (oxygen uptake per heart beat) at the anaerobic threshold improved (+0·9 (0·0 to 1·8) ml/beat), and a higher peak work rate (+13 (4 to 22) W) was achieved. This was associated with improved preoperative QoL, with the overall SF-36® score increasing by 11 (95 per cent c.i. 1 to 21) (P = 0·028) and the overall SF-36® mental health score by 11 (1 to 22) (P = 0·037). A 4-week prehabilitation programme can deliver improvements in CPET scores and QoL before liver resection. This may impact on perioperative outcome. NCT01523353 (https://clinicaltrials.gov).