The literature suggests that hepatocellular Yes-associated protein 1 (YAP1) signaling is activated following hepatectomy and that such activation can suppress the growth of metastatic liver tumors. The prognosis of a real-world cohort of 240 patients with colorectal cancer liver metastasis (CRLM) undergoing major and minor hepatectomy was compared after adjusting for confounding factors. To model CRLM, we induced liver metastasis in mice by transsplenically injecting MC38 cells. We found that patients with CRLM and mice undergoing major hepatectomy had better survival compared to those undergoing minor hepatectomy. Mechanistically, extensive hepatectomy activates hepatocellular YAP1 by regulating the epidermal growth factor receptor, altering glutamine metabolism-related gene expression and increasing liver glutamine consumption. This metabolic shift leads to glutamine scarcity in tumor cells, causing increased reactive oxygen species production, which promotes loss of YAP1 activity in tumor cells. Consequently, the production of the chemokine CXCL5 is suppressed, which inhibits myeloid-derived suppressor cell infiltration and enhancing the immunological function of CD8+ T cells.