Hepatocellular carcinoma (HCC) is a common malignancy. However, the molecular mechanisms of the progression and prognosis of HCC remain unclear. In the current study, we merged three Gene Expression Omnibus (GEO) datasets and combined them with The Cancer Genome Atlas (TCGA) dataset to screen differentially expressed genes. Furthermore, protein‒protein interaction (PPI) and weighted gene coexpression network analysis (WGCNA) were used to identify key gene modules in the progression of HCC. Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses indicated that the terms were associated with the cell cycle and DNA replication. Then, four hub genes were identified (AURKA, CCNB1, DLGAP5, and NCAPG) and validated via the expression of proteins and transcripts using online databases. In addition, we established a prognostic model using univariate Cox proportional hazards regression and least absolute shrinkage and selection operator (LASSO) regression. Eight genes were identified as prognostic genes, and four genes (FLVCR1, HMMR, NEB, and UBE2S) were detrimental gens. The areas under the curves (AUCs) at 1, 3 and 5 years were 0.622, 0.69, and 0.684 in the test dataset, respectively. The effective of prognostic model was also validated using International Cancer Genome Consortium (ICGC) dataset. Moreover, we performed multivariate independent prognostic analysis using multivariate Cox proportional hazards regression. The results showed that the risk score was an independent risk factor. Finally, we found that all prognostic genes had a strong positive correlation with immune infiltration. In conclusion, this study identified the key hub genes in the development and progression of HCC and prognostic genes in the prognosis of HCC, which was significant for the future diagnosis and prognosis of HCC.