BACKGROUND There is currently conflicting evidence surrounding the effects of obesity on postoperative outcomes. Previous studies have found obesity to be associated with adverse events, but others have found no association. The aim of this study was to determine whether increasing body mass index (BMI) is an independent risk factor for development of major postoperative complications. METHODS This was a multicentre prospective cohort study across the UK and Republic of Ireland. Consecutive patients undergoing elective or emergency gastrointestinal surgery over a 4-month interval (October-December 2014) were eligible for inclusion. The primary outcome was the 30-day major complication rate (Clavien-Dindo grade III-V). BMI was grouped according to the World Health Organization classification. Multilevel logistic regression models were used to adjust for patient, operative and hospital-level effects, creating odds ratios (ORs) and 95 per cent confidence intervals (c.i.). RESULTS Of 7965 patients, 2545 (32·0 per cent) were of normal weight, 2673 (33·6 per cent) were overweight and 2747 (34·5 per cent) were obese. Overall, 4925 (61·8 per cent) underwent elective and 3038 (38·1 per cent) emergency operations. The 30-day major complication rate was 11·4 per cent (908 of 7965). In adjusted models, a significant interaction was found between BMI and diagnosis, with an association seen between BMI and major complications for patients with malignancy (overweight: OR 1·59, 95 per cent c.i. 1·12 to 2·29, P = 0·008; obese: OR 1·91, 1·31 to 2·83, P = 0·002; compared with normal weight) but not benign disease (overweight: OR 0·89, 0·71 to 1·12, P = 0·329; obese: OR 0·84, 0·66 to 1·06, P = 0·147). CONCLUSION Overweight and obese patients undergoing surgery for gastrointestinal malignancy are at increased risk of major postoperative complications compared with those of normal weight.