In this investigation, we explored the molecular dynamics guiding the progression of castration-resistant prostate cancer (CRPC) influenced by Helicobacter pylori (H. pylori)-mediated M2 polarization of macrophages through the IL-17RA/CTSK/EMT axis. An 830-patient clinical trial categorized subjects into hormone-sensitive prostate cancer (HSPC) and CRPC groups. H. pylori infection, evaluated by ELISA, exhibited a higher incidence in CRPC patients, impacting overall survival (OS) and progression-free survival. In-depth in vitro and in vivo experiments, including 16S rDNA sequencing, immunohistochemical tests, and transcriptome analysis, unveiled that H. pylori promotes CRPC growth and metastasis by upregulating IL-17RA and CTSK, leading to enhanced EMT. Notably, M2 macrophages emerged as pivotal immune cells influencing CRPC progression. This study uncovers a novel pathway wherein H. pylori enrichment exacerbates CRPC by inducing macrophage M2 polarization, IL-17RA/CTSK expression, and EMT activation, shedding light on a previously unrecognized mechanism contributing to the growth and metastasis of CRPC.