Patients in the high-risk score subgroup had significantly increased TMB values, PD1, PD-L1, CD276, CTLA4, CXCR4, OX40, and CD137, indicating that ER stress could affect the immune microenvironment in HCC, and immune checkpoint inhibitor (ICIs) treatment was more effective for patients in high-risk subgroup. Here, CXCR4 is linked to hepatocellular carcinoma.