AimsIn the cancer-related research field, there is currently a major need for a greater number of valuable biomarkers to predict the prognosis of hepatocellular carcinoma (HCC). In this study, we aimed to screen hub genes related to immune cell infiltration and explore their prognostic value for HCC.MethodsWe analyzed five datasets (GSE46408, GSE57957, GSE74656, GSE76427, and GSE87630) from the Gene Expression Omnibus database to screen the differentially expressed genes (DEGs). A protein–protein interaction network of the DEGs was constructed using the Search Tool for the Retrieval of Interacting Genes; then, the hub genes were identified. Functional enrichment of the genes was performed on the Metascape website. Next, the expression of these hub genes was validated in several databases, including Oncomine, Gene Expression Profiling Interactive Analysis 2 (GEPIA2), and Human Protein Atlas. We explored the correlations between the hub genes and infiltrated immune cells in the TIMER2.0 database. The survival curves were generated in GEPIA2, and the univariate and multivariate Cox regression analyses were performed using TIMER2.0.ResultsThe top ten hub genes [DNA topoisomerase II alpha (TOP2A), cyclin B2 (CCNB2), protein regulator of cytokinesis 1 (PRC1), Rac GTPase-activating protein 1 (RACGAP1), aurora kinase A (AURKA), cyclin-dependent kinase inhibitor 3 (CDKN3), nucleolar and spindle-associated protein 1 (NUSAP1), cell division cycle-associated 5 (CDCA5), abnormal spindle microtubule assembly (ASPM), and non-SMC condensin I complex subunit G (NCAPG)] were identified in subsequent analysis. These genes are most markedly enriched in cell division, suggesting their close association with tumorigenesis. Multi-database analyses validated that the hub genes were upregulated in HCC tissues. All hub genes positively correlated with several types of immune infiltration, including B cells, CD4+ T cells, macrophages, and dendritic cells. Furthermore, these hub genes served as independent prognostic factors, and the expression of these hub genes combing with the macrophage levels could help predict an unfavorable prognosis of HCC.ConclusionIn sum, these hub genes (TOP2A, CCNB2, PRC1, RACGAP1, AURKA, CDKN3, NUSAP1, CDCA5, ASPM, and NCAPG) may be pivotal markers for prognostic prediction as well as potentially work as targets for immune-based intervention strategies in HCC.