Postoperative complications have a great impact on the postoperative course and oncological outcomes following major cancer surgery. Among them, infective complications play an important role. The aim of this study was to evaluate whether postoperative infective complications influence long-term survival after liver resection for hepatocellular carcinoma (HCC). Patients who underwent resection with curative intent for HCC between July 2003 and June 2016 were identified from a multicentre database (8 institutions) and analysed retrospectively. Independent risk factors for postoperative infective complications were identified. After excluding patients who died 90 days or less after surgery, overall survival (OS) and recurrence-free survival (RFS) were compared between patients with and without postoperative infective complications within 30 days after resection. Among 2442 patients identified, 332 (13·6 per cent) had postoperative infective complications. Age over 60 years, diabetes mellitus, obesity, cirrhosis, intraoperative blood transfusion, duration of surgery exceeding 180 min and major hepatectomy were identified as independent risk factors for postoperative infective complications. Univariable analysis revealed that median OS and RFS were poorer among patients with postoperative infective complications than among patients without (54·3 versus 86·8 months, and 22·6 versus 43·2 months, respectively; both P < 0·001). After adjustment for other prognostic factors, multivariable Cox regression analyses identified postoperative infective complications as independently associated with decreased OS (hazard ratio (HR) 1·20, 95 per cent c.i. 1·02 to 1·41; P = 0·027) and RFS (HR 1·19, 1·03 to 1·37; P = 0·021). Postoperative infective complications decreased long-term OS and RFS in patients treated with liver resection for HCC. © 2019 BJS Society Ltd. Published by John Wiley & Sons Ltd.