According to these results, EZH2 has a critical function within the immune microenvironment and deserves to be regarded as a prognostic marker and immunotherapeutic target for hepatocellular carcinoma. Here, EZH2 is linked to hepatocellular carcinoma.