The low-risk group showed better OS, an independent HCC prognostic indicator. A nomogram combining features and TNM stages was constructed. TP53 mutations were more frequent in high-risk individuals. CD4+ T cells, NK cells, and macrophages differed significantly between groups. High-risk individuals had increased immune checkpoint molecule expression. The low-risk group responded better to sorafenib and cisplatin. The gene discussed is CD4; the disease is hepatocellular carcinoma.