Liver cancer is the third leading cause of cancer-associated mortality worldwide. By the time liver cancer is diagnosed, it is already in the advanced stage. Therefore, novel therapeutic strategies need to be identified to improve the prognosis of patients with liver cancer. In the present study, the profiles of GSE84402, GSE19665 and GSE121248 were used to screen differentially expressed genes (DEGs). Subsequently, Gene Ontology and Kyoto Encyclopedia of Genes and Genomes pathway enrichment analyses for DEGs were conducted using the Database for Annotation, Visualization and Integrated Discovery. The protein-protein interaction network was established to screen the hub genes associated with liver cancer. Additionally, the expression levels of hub genes were validated using the Gene Expression Profiling Interactive Analysis and Oncomine databases. In addition, the prognostic value of hub genes in patients with liver cancer was analyzed using Kaplan-Meier Plotter. It was demonstrated that 132 and 246 genes were upregulated and downregulated, respectively, in patients with liver cancer. Among these DEGs, 10 hub genes with high connected node values were identified, which were AURKA, BIRC5, BUB1B, CCNA2, CCNB1, CCNB2, CDC20, CDK1, DLGAP5 and MAD2L1. CDK1 and CCNB1 had the most connection nodes and the highest score and were therefore, the most significantly expressed. In addition, it was demonstrated that high expression levels of CDK1 and CCNB1 were associated with poor overall survival time of patients with liver cancer. Dihydroartemisinin (DHA) is a Food and Drug Administration-approved drug, which is derived from the traditional Chinese medicine Artemisia annua Linn. DHA inhibits cell proliferation in numerous cancer types, including liver cancer. In our previous study, it was revealed that DHA inhibited the proliferation of HepG2215 cells. In the present study, it was further demonstrated that DHA reduced the expression levels of CDK1 and CCNB1 in liver cancer. Overall, CDK1 and CCNB1 were the potential therapeutic targets of liver cancer, and DHA reduced the expression levels of CDK1 and CCNB1, and inhibited the proliferation of liver cancer cells.