Bladder cancer development is closely associated with the dynamic interaction and communication between M2 macrophages and tumor cells. However, specific biomarkers for targeting M2 macrophages in immunotherapy remain limited and require further investigation. In this study, we identified key co-expressed genes in M2 macrophages and developed gene signatures to predict prognosis and immunotherapy response in patients. Public database provided the bioinformatics data used in the analysis. We created and verified an M2 macrophage-related gene signature in these datasets using Lasso-Cox analysis. The predictive value and immunological functions of our risk model were examined in bladder cancer patients, and 158 genes were found to be significantly positively correlated with M2 macrophages. Moreover, we identified two molecular subgroups of bladder cancer with markedly different immunological profiles and clinical prognoses. The five key risk genes identified in this model were validated, including CALU, ECM1, LRP1, CYTL1, and CCDC102B, demonstrating the model can accurately predict prognosis and identify unique responses to immunotherapy in patients with bladder cancer. In summary, we constructed and validated a five-gene signature related to M2 macrophages, which shows strong potential for forecasting bladder cancer prognosis and immunotherapy response.