Here, we demonstrate that androgen receptor pathway inhibitor (ARPI) plus irradiation (IR) triggered robust anticancer immunity in prostate cancers in both patients and mice. This evidence concerns the gene AR and prostate cancer.