Ferroptosis, an iron-dependent form of programmed cell death, significantly impacts cancer, yet its link to prostate cancer (PCa) prognosis remains underexplored. This study aims to develop and validate a ferroptosis-related gene signature to predict PCa prognosis and immune microenvironment differences, potentially identifying therapeutic targets. RNA-sequencing data of 478 PCa patients and corresponding clinical data were downloaded from The Cancer Genome Atlas (TCGA) database. We investigated the disease-free survival (DFS) rates of the high- and low-risk groups using the Kaplan-Meier method. Functional differences between the high- and low-risk groups were investigated by a gene set enrichment analysis (GSEA), and Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses. The link between ferroptosis risk score and immune status was examined using CIBERSORT. The expression levels of core prognostic genes in benign prostatic hyperplasia (BPH) and PCa were verified using quantitative real-time polymerase chain reaction (qRT-PCR), Western blot, and immunohistochemistry (IHC). A novel ferroptosis-related prognostic gene signature was established and tested in the Gene Expression Omnibus (GEO) database based on univariate and multivariate Cox regression analyses. Patients with PCa were classified into high- and low-risk groups based on this ferroptosis signature. Patients in the high-risk group had worse outcomes than those in the low-risk group. The predictive accuracy of the model was demonstrated by a receiver operating characteristic (ROC) analysis. An additional enrichment analysis of TCGA cohort revealed the immune-related pathways were significantly upregulated in the high-risk group, with areas under the curve (AUCs) of 0.85 at 1 year, 0.82 at 3 years, and 0.76 at 5 years. In the GEO cohort, the AUCs reached 0.69 at 1 year, 0.74 at 3 years, and 0.75 at 5 years. An additional enrichment analysis indicated a significant upregulation of cytokine-related pathways, immune receptor activity, and other immune-related pathways in the high-risk group. Furthermore, the analysis revealed that the proportions of mast cells and plasma cells were significantly lower in the high-risk group compared to the low-risk group of PCa patients. Conversely, the proportion of regulatory T cells (Tregs) was significantly higher in the high-risk group than in the low-risk group. According to the qRT-PCR, Western blot, and IHC results, DRD4, SRC, AKR1C2, and AIFM2 expression was significantly higher in PCa than BPH. We also showed that the ferrostatin 1-treated LNCaP cells had higher expression levels of DRD4, SRC, and AKR1C2. A prognostic signature of eight ferroptosis-related genes (FRGs) that may accurately predict PCa patient outcomes was constructed and validated. FRGs may contribute to anti-tumor immunity and serve as therapeutic targets in PCa.