Background: Hepatocellular carcinoma (HCC) is a common malignant tumor with high mortality and heterogeneity. Genetic mutations caused by driver genes are important contributors to the formation of the tumor microenvironment. The purpose of this study is to discuss the expression of cancer driver genes in tumor tissues and their clinical value in predicting the prognosis of HCC.Methods: All data were sourced from The Cancer Genome Atlas (TCGA), International Cancer Genome Consortium (ICGC), and Gene Expression Omnibus (GEO) public databases. Differentially expressed and prognostic genes were screened by the expression distribution of the cancer driver genes and their relationship with survival. Candidate genes were subjected to functional enrichment and transcription factor regulatory network. We further constructed a prognostic signature and analyzed the survival outcomes and immune status between different risk groups.Results: Most cancer driver genes are specifically expressed in cancer tissues. Driver genes may influence HCC progression through processes such as transcription, cell cycle, and T-cell receptor-related pathways. Patients in different risk groups had significant survival differences (p < 0.05), and risk scores showed high predictive efficacy (AUC>0.69). Besides, risk subgroups were also associated with multiple immune functions and immune cell content.Conclusion: We confirmed the critical role of cancer driver genes in mediating HCC progression and the immune microenvironment. Risk subgroups contribute to the assessment of prognostic value in different patients and explain the heterogeneity of HCC.