BACKGROUNDHepatocellular Carcinoma (HCC) is the most common type of primary liver cancer, accounting for the majority of liver cancer cases. Hepatocellular Carcinoma not only exhibits high heterogeneity but also possesses an immune-suppressive tumor microenvironment that promotes tumor evasion, posing substantial difficulties for efficient therapy. Our aim is to utilize single-cell RNA transcriptome data to investigate the dynamic changes in the tumor microenvironment during the malignant progression of HCC, the communication among immune cells, and the marker genes associated with patient prognosis.METHODSWe constructed expression matrices from open single-cell RNA transcriptome data (GSE149614) of HCC patients (representing stages I-IV), establishing single-cell RNA transcriptional atlases for different stages of HCC progression. For each stage, we conducted cell subgroup analysis to identify cell types at each stage. Horizontally, we explored the dynamic changes of the same cell type across different stages, performing trajectory analysis and prognosis analysis. Vertically, we investigated pairwise comparisons of different stages of HCC progression, probing the dynamic alterations in tumor microenvironment immune cell signaling pathways. Finally, potential drugs for the treatment of HCC were predicted based on relevant genes.FINDINGSAs the HCC advances towards increased malignancy, there is a shift in the predominant composition of the tumor microenvironment, with a decline in the dominance of hepatic cells. Tumor-infiltrating immune cells migrate and accumulate within the tumor microenvironment, where T cells and myeloid cells display distinct patterns of change. Genes associated with cancer-associated fibroblasts (CAFs) and T cells are correlated with adverse patient outcomes. In the late stages of HCC, the tumor microenvironment is infiltrated by more myeloid-derived suppressor cells (MDSCs), and a prognostic model constructed based on genes related to myeloid cells can predict patient outcomes. Additionally, in the analysis of transcription factors, YY1 and MYC are found to be highly expressed. Cell communication analysis among tumor-infiltrating immune cells reveals significant differences in the main signaling pathways at different stages of HCC progression. Finally, drug sensitivity analysis based on key genes identifies Acetalax, Allopurinol, and Amonafide as potential candidates for HCC treatment.