BackgroundProstate cancer remains a prominent challenge in oncology, with advanced stages showing poor prognosis. The tumor microenvironment (TME), and particularly tumor-associated macrophages (TAMs), plays a crucial role in disease progression. This study explores the single-cell transcriptomics of prostate cancer, determines macrophage heterogeneity, identifies prognostic gene markers, and assesses the role of PPIF in TAMs. MethodsSingle-cell RNA sequencing data from the GEO database (GSE176031) and transcriptome data from the TCGA were processed to characterize cell populations and identify prognostic genes in prostate cancer. Macrophage subpopulations were examined through clustering, followed by gene set scoring based on migration, activation, and proliferation. PPIF expression in macrophages was investigated using multiplex immunofluorescence staining on matched prostate cancer and adjacent non-tumoral tissues. ResultsThe single-cell analysis identified 9,178 cells, categorized into 10 principal cell types, with macrophages constituting a significant part of the immune microenvironment. Four macrophage subgroups demonstrated distinct functional pathways: phagocytic, immune-regulatory, and proliferative. A total of 39 genes correlated with prostate cancer prognosis were identified, of which 10 carried the most significant prognostic information. Peptidylprolyl Isomerase F (PPIF) expression was significantly higher in TAMs from tumor tissue than normal tissue, indicating its potential regulatory role in the immune microenvironment. ConclusionThe intricate cellular architecture of the prostate cancer TME has been elucidated, with a focus on macrophage heterogeneity and functional specialization. Prognostic genes, including PPIF, were associated with survival outcomes, providing potential therapeutic targets. PPIF’s prominent expression in TAMs may serve as a lever in cancer progression, warranting further investigation as a biomarker and a molecule of interest for therapeutic targeting within the prostate cancer milieu.