The study explored the dysregulation mechanism and potential biomarkers of immune-related genes and further identified the influence of immune cells on the prognosis of HCC, providing a theoretical basis for the prognosis prediction and immunotherapy in HCC patients.