Background: Immunotherapy has a significant effect on the treatment of many tumor types. However, prostate cancers generally fail to show significant responses to immunotherapy owing to their immunosuppressive microenvironments. To sustain progress towards more effective immunotherapy for prostate cancer, comprehensive analyses of the genetic characteristics of the immune microenvironment and novel therapeutic strategies are required. Methods: The transcriptome profiles of patients with prostate cancer were obtained from GEO and processed with the TIDE algorithm to predict their responses to immunotherapy. Next, the significant differentially expressed genes (DEGs) between the responder and non-responder groups were identified and used to compute the co-expression modules by WGCNA. Then, co-expression networks were constructed and survival analysis was applied to hub genes. Finally, drug candidates to alleviate immunosuppression were filtered in prostate cancer using GSEA based on hub genes. Results: In total, we identified 2758 significant DEGs and constructed 16 co-expression modules, seven of which were significantly correlated with the immune response score. In total, 133 hub genes were identified, of which 13 were significantly associated with prostate cancer prognosis. Co-expression networks of hub genes were constructed with KMT2B at the center. Finally, six candidate drugs for prostate cancer immunotherapy were identified in PC3 and LNCaP cell lines. Conclusions: We obtained datasets from multiple platforms, performed integrated bioinformatic analysis to identify 133 hub genes and 13 biomarkers of an immunotherapy response, and six candidate drugs were filtered to inhibit the immunosuppressive tumor microenvironment, to ultimately improve patient responses to immunotherapy in prostate cancer.