BackgroundLiver cancer is the sixth most common diagnosed cancer, and the fourth most common cause of cancer death in the world. Currently, the most commonly used diagnostic marker in clinical practice is alpha-fetoprotein(AFP), but its diagnostic accuracy is low. At the same time, the prognosis of liver cancer patients is of great significance to the determination of the diagnosis and treatment of liver cancer and the improvement of the quality of life of the patients. Therefore, the purpose of this paper is to find new diagnostic markers and prognostic markers of liver cancer and to explore the pathways and biological functions related to the prognosis of liver cancer. MethodsWe firstly obtained the GSE25097 dataset and the the Cancer Genome Atlas(TCGA) datasets respectively and then analysed the differentially expressed genes(DEGs). To study the potential biological function of DEGs, we conducted enrichment analysis of GO biological functions and the Reactome pathway with R language. We used protein-protein interaction network analysis to identify the relationship among these common DEGs(Common DEGs), and further screened out the hub genes among these Common DEGs. We used ROC curve analysis to screen the hub genes to determine the genes that could be used as diagnostic markers of liver cancer. Kaplan-Meier analysis and Cox proportional hazards model were used to screen genes associated with prognosis of liver cancer, and further single-gene GSEA(gene set enrichment analysis) was performed on the prognosis genes to explore the mechanism affecting the survival and prognosis of liver cancer patients. ResultsWe obtained 790 DEGs and 2162 DEGs respectively from the GSE25097 and TCGA LIHC data sets, and get 102 Common DEGs by overlapping the two DEGs. We screened 22 hub genes from 102 Common DEGs. We used ROC curve and survival curve to analyze these 22 Hub genes, and found that there were 16 genes with the AUC > 90%, among which the expression levels of ESR1,SPP1 and FOSB genes were closely related to the survival time of liver cancer patients. We revealed all the related pathways of ESR1, FOSB and SSP1 genes by using single-gene GSEA analysis, and found three common pathways of ESR1, FOBS and SPP1 genes, seven common pathways of ESR1 and SPP1 genes, and four common pathways of ESR1 and FOSB genes.Conclusionwe found that ten genes with high expression in the liver cancer, including SPP1, AURKA, NUSAP1, TOP2A, UBE2C, AFP, GMNN, PTTG1, RRM2 and SPARCL1, and six genes with low expression, including CXCL12, FOS, DCN, SOCS3, FOSB and PCK1, can be used as markers of liver cancer diagnosis, among which FOBS and SPP1 genes can also be used as prognostic markers of liver cancer. Activation of the cell cycle-related pathway, PANCREAS BETA CELLS pathway, and the estrogen signalling pathway in LIVER CANCER patients, while inhibition of the HALLMARK HEME METABOLISM pathway, HALLMARK COAGULATION pathway, and the fat metabolism pathway may promote the prognosis in LIVER CANCER patients.