Objective To investigate differentially expressed genes (DEGs) and potential molecular mechanisms between hepatitis C-related hepatocellular carcinoma (HCV-HCC) and hepatitis B-related HCC (HBV-HCC). Methods The data of HCV-HCC and HBV-HCC gene expression were downloaded and integrated from the public gene expression database, and the limma package was used to investigate the DEGs between the HCV-HCC and HBV-HCC samples. The gene set enrichment analysis (GSEA) was used to explore the differences in suppressed or activated gene sets between the HCV-HCC and HBV-HCC samples, and the MCODE was used to explore the key molecular modules, and then the potential biological processes and molecular pathways of the key molecular modules were analyzed. The effect of key genes on survival of the HCC patients was analyzed by the Kaplan-Meier-Plotter database.Results In this study, 119 HBV-HCC samples and 163 HCV-HCC samples were obtained, and the 199 DEGs were screened out. Compared with HBV-HCC, the activated gene sets of HCV-HCC were mainly enriched in the gene sets of inflammation, complement, up-regulation of genes in response to interferon, up-regulation of genes in response to KRAS, genes regulated by the nuclear factor- κB-tumor necrosis factor pathway, and apoptosis. However, the cell cycle-related gene sets were obviously suppressed. Eight key molecular modules enriched by DEGs were found, which included 18 key genes (IFI27, DDX60, MX1, IRF9, OAS3, OAS1, RSAD2, GBP4, HERC6, ISG15, IFIT1, CMPK2, EPSTI1, IFI44, IFI44L, HERC5, IFITM1, CXCL10). GO analysis showed that the biological process was mainly concentrated in the body response related to virus infection, the molecular components were mainly in the host cells, and the molecular function was mainly enriched in the biological combination. KEGG analysis showed that the key genes were mainly involved in the molecular signaling pathway related to virus infection. The survival analysis showed that the 9 key genes (CXCL10, HERC6, DDX60, IFITM1, IFI27, GBP4, IFI44L, IFI44, MX1) were closely related to better prognosis of patients with HCC (HR<1, P<0.05). Conclusions There is an essential difference between HBV-HCC and HCV-HCC. Occurrence of HCV-HCC is mainly related to virus infection and immune response induced by the virus. Therefore, for HCV infection, active antiviral treatment is necessary for avoiding hepatitis turning into chronic viral infection and preventing or blocking HCV infection converting to HCC.