Hepatocellular carcinoma (HCC) has an insidious onset and poor prognosis, and the limited diagnostic accuracy of alpha-fetoprotein necessitates novel biomarkers. This study aims to construct an analytical framework for integrating multi-omics data from tumor tissues and single-cell transcriptomes. By integrating and analyzing the transcriptomic and clinical data of HCC, we confirmed that glucose-6-phosphate dehydrogenase (G6PD) is significantly upregulated in tumor tissues and consistently overexpressed across multiple independent cohorts, with a diagnostic area under the curve of 0.906. High G6PD expression was associated with shorter overall survival and remained an independent adverse prognostic factor. To explore the potential mechanism, a virtual knockout of G6PD was simulated on single-cell transcriptomic data, which indicated that G6PD knockout significantly perturbs immune-related pathways, including antigen processing and presentation and phagocytosis. These findings not only highlight the potential of G6PD as a candidate diagnostic and prognostic biomarker for HCC but also suggest its involvement in the tumor immune microenvironment, offering new directions for further research on the diagnosis and treatment of HCC.