Single-cell RNA-sequencing (scRNA-seq) presents better insights into cell behavior in the context of a complex tumor microenvironment by profiling single-cell populations. However, the mechanisms underlying treatment failure in hepatocellular carcinoma (HCC) are poorly understood. In this study, we performed deep scRNA-seq on immune cells under the isolation in peripheral blood, cancer tissues, and nearby common tissues of four HCC cases and two non-cancer controls, and 212,494 cells were included in the analysis. We identified distinct immune cell subtypes, enriched pathways for differential genes, and delineated associated developmentally relevant trajectories. APOC1 was found over-expressed in tumor-associated macrophages (TAMs) of HCC tissues than in normal tissues. Inhibition of APOC1 reversed the M2 phenotype to the M1 phenotype via the ferroptosis pathway in TAMs from HCC. Tumors in APOC1 −/− C57BL/6 mice demonstrated consistent attenuation compared to wild-type (WT) mice. Mass spectrometry results revealed that the relative proportion of M2 macrophages, B cells, and CD4 + T cells in the APOC1 −/− group exhibited a downward expression compared with the WT group, whereas CD8 + T cells, M1 macrophages, and NK cells exhibited an upward trend. Finally, APOC1 was found to be negatively correlated with the expression of PD1/PD-L1 in human HCC samples. In conclusion, the present study demonstrated that inhibiting APOC1 can promote the transformation of M2 macrophages into M1 macrophages via the ferroptosis pathway, thereby reshaping the tumor immune microenvironment and improving the anti-PD1 immunotherapy for HCC, providing a new strategy for improving the therapeutic effect of anti-PD1, and bringing new hope to HCC patients.