BACKGROUND: Cancer development is closely associated with complex alterations in the tumor microenvironment (TME). Among these, immune cells within the TME play a huge role in personalized tumor diagnosis and treatment. OBJECTIVES: This review aims to summarize the diversity of immune cells in the TME, their impact on patient prognosis and treatment response, and the contributions of single-cell RNA sequencing (scRNA-seq) in understanding their functional heterogeneity. METHODS: We analyzed recent studies utilizing scRNA-seq to investigate immune cell populations in the TME, focusing on their interactions and regulatory mechanisms. RESULTS: ScRNA-seq reveals the functional heterogeneity of immune cells, enhances our understanding of their role in tumor antibody responses, and facilitates the construction of immune cell interaction networks. These insights provide guidance for the development of cancer immunotherapies and personalized treatment approaches. CONCLUSION: Applying scRNA-seq to immune cell analysis in the TME offers a novel pathway for personalized cancer treatment. Despite its promise, several challenges remain, highlighting the need for further advancements to fully integrate scRNA-seq into clinical applications.