Patients with liver cancer or space-occupying cysts suffer from malnutrition due to compression of gastric and digestive structures, liver and cancer-mediated dysmetabolism, and impaired nutrient absorption. As proportion of these patients requires removal of lesions through hepatic resection, it is important to evaluate the effects of malnutrition on post-hepatectomy outcomes. In our study approach, 2011–2017 National Inpatient Sample was used to isolate in-hospital hepatectomy cases, which were stratified using malnutrition (composite of malnutrition, sarcopenia and weight loss/cachexia). The malnutrition-absent controls were matched to cases using nearest neighbour propensity score matching method and compared with the following endpoints: mortality, length of stay, hospitalisation costs and postoperative complications. There were 2531 patients in total who underwent hepatectomy with matched number of controls from the database; following the match, malnutrition cohort (compared with controls) was more likely to experience in-hospital death (6·60 % v. 5·25 % P < 0·049, OR 1·27, 95 % CI 1·01, 1·61) and was more likely to have higher length of stay (18·10 d v. 9·32 d, P < 0·001) and hospitalisation costs ($278 780 v. $150 812, P < 0·001). In terms of postoperative complications, malnutrition cohort was more likely to experience bleeding (6·52 % v. 3·87 %, P < 0·001, OR 1·73, 95 % CI 1·34, 2·24), infection (6·64 % v. 2·49 %, P < 0·001, OR 2·79, 95 % CI 2·07, 3·74), wound complications (4·5 % v. 1·38 %, P < 0·001, OR 3·36, 95 % CI 2·29, 4·93) and respiratory failure (9·40 % v. 4·11 %, P < 0·001, OR 2·42, 95 % CI 1·91, 3·07). In multivariate analysis, malnutrition was associated with higher mortality (P < 0·028, adjusted OR 1·3, 95 % CI 1·03, 1·65). Thus, we conclude that malnutrition is a risk factor of postoperative mortality in patients undergoing hepatectomy.