Background: Hepatocellular carcinoma (HCC) originates from the hepatocytes and accounts for 90% of liver cancer. The study intends to identify novel prognostic biomarkers for predicting the prognosis of HCC patients based on TCGA and GSE14520 cohorts. Methods: Differential analysis was employed to obtain the DEGs (Differentially Expressed Genes) of the TCGA-LIHC-TPM cohort. The lasso regression analysis was applied to build the prognosis model through using the TCGA cohort as the training group and the GSE14520 cohort as the testing group. Next, based on the prognosis model, we performed the following analyses: the survival analysis, the independent prognosis analysis, the clinical feature analysis, the mutation analysis, the immune cell infiltration analysis, the tumor microenvironment analysis, and the drug sensitivity analysis. Finally, the survival time of HCC patients was predicted by constructing nomograms. Results: Through the lasso regression analysis, we obtained a prognosis model of ten genes including BIRC5 (baculoviral IAP repeat containing 5), CDK4 (cyclin-dependent kinase 4), DCK (deoxycytidine kinase), HSPA4 (heat shock protein family A member 4), HSP90AA1 (heat shock protein 90 α family class A member 1), PSMD2 (Proteasome 26S Subunit Ubiquitin Receptor, Non-ATPase 2), IL1RN (interleukin 1 receptor antagonist), PGF (placental growth factor), SPP1 (secreted phosphoprotein 1), and STC2 (stanniocalcin 2). First, we found that the risk score is an independent prognosis factor and is related to the clinical features of HCC patients, covering AFP (α-fetoprotein) and stage. Second, we observed that the p53 mutation was the most obvious mutation between the high-risk and low-risk groups. Third, we also discovered that the risk score is related to some immune cells, covering B cells, T cells, dendritic, macrophages, neutrophils, etc. Fourth, the high-risk group possesses a lower TIDE score, a higher expression of immune checkpoints, and higher ESTIMATE score. Finally, nomograms include the clinical features and risk signatures, displaying the clinical utility of the signature in the survival prediction of HCC patients. Conclusions: Through the comprehensive analysis, we constructed an immune-related prognosis model to predict the survival of HCC patients. In addition to predicting the survival time of HCC patients, this model significantly correlates with the tumor microenvironment. Furthermore, we concluded that these ten immune-related genes (BIRC5, CDK4, DCK, HSPA4, HSP90AA1, PSMD2, IL1RN, PGF, SPP1, and STC2) serve as novel targets for antitumor immunity. Therefore, this study plays a significant role in exploring the clinical application of immune-related genes.