Purpose: Prostate cancer (PCa) is often considered as a "cold" tumor with low responsiveness to immunotherapy. Recent evidence suggests the activation of specific immune cells, such as tumor-associated macrophages (TAMs), could potentially influence the efficacy of immunotherapy in PCa. However, the relationship between TAMs and PD-L1, a significant regulator in immunotherapy, within PCa remains unexplored. Methods: In this study, we assessed TAM infiltration and PD-L1 expression levels in a local cohort of 95 PCa tissue samples and two publicly available PCa datasets. We employed a combination of bioinformatics and experimental techniques, including gene set enrichment analysis, CIBERSORTx, tissue microarray, immunohistochemistry staining, and analysis of single-cell sequencing datasets, to provide a comprehensive understanding of the association between PD-L1 and TAMs in the PCa microenvironment. Results: The study showed that CD68+ TAMs and CD163+ TAMs (M2-TAMs) were more abundant in the tumor microenvironment than in non-cancerous surrounding tissues. The infiltration of CD163+ TAMs was significantly associated with the Gleason score and risk stratification of PCa. Importantly, elevated PD-L1 expression correlated significantly with high infiltration of CD163+ TAMs. Furthermore, patients displaying high levels of CD163+ TAMs and PD-L1 expression exhibited shorter times to biochemical recurrence-free survival. Conclusion: Our study suggests that CD163+ TAMs are closely associated with PD-L1 expression and can act as a valuable prognostic indicator for PCa. The high infiltration of M2-TAMs, coupled with the overexpression of PD-L1, may contribute to immune escape mechanisms in PCa, thereby influencing disease prognosis.