The role of Th17 cells in prostate cancer (PCa) is not fully understood. The transcription factor BATF controls the differentiation of Th17 cells. Mice deficient in Batf do not produce Th17 cells. In this study, we aimed to characterize the role of Batf-dependent Th17 cells in PCa by crossbreeding Batf knockout (Batf-/-) mice with mice conditionally mutant for Pten. We found that Batf-/- mice had changes in the morphology of prostate epithelial cells compared to normal mice, and Batf-/- mice deficient in Pten (named Batf-) had smaller prostate size and developed fewer invasive prostate adenocarcinomas than Pten-deficient mice with Batf expression (named Batf+). The prostate tumors in Batf- mice showed reduced proliferation, increased apoptosis, decreased angiogenesis and inflammatory cell infiltration, and activation of NF-κB signaling. Moreover, Batf- mice showed significantly reduced IL-23/IL-23R signaling. In the prostate stroma of Batf- mice, IL-23R-positive cells were decreased considerably compared to Batf+ mice. Splenocytes and prostate tissues from Batf- mice cultured under Th17 differentiation conditions expressed reduced IL-23/IL-23R than cultured cells from Batf+ mice. Anti-IL23p19 antibody treatment of Pten-deficient mice reduced prostate tumors and angiogenesis compared to control IgG-treated mice. In human prostate tumors, BATF mRNA level was positively correlated with IL23A and IL-23R but not RORC. Our novel findings underscore the crucial role of IL-23/IL23R signaling in mediating the function of Batf-dependent Th17 cells, thereby promoting PCa initiation and progression. This highlights the Batf-IL-23R axis as a promising target for the development of innovative strategies for PCa prevention and treatment.