Cancer immune plays a critical role in cancer progression. Tumour immunology and immunotherapy are one of the exciting areas in bladder cancer research. In this study, we aimed to develop an immune‐related gene signature to improve the prognostic prediction of bladder cancer. Firstly, we identified 392 differentially expressed immune‐related genes (IRGs) based on TCGA and ImmPort databases. Functional enrichment analysis revealed that these genes were enriched in inflammatory and immune‐related pathways, including in ‘regulation of signaling receptor activity’, ‘cytokine‐cytokine receptor interaction’ and ‘GPCR ligand binding’. Then, we separated all samples in TCGA data set into the training cohort and the testing cohort in a ratio of 3:1 randomly. Data set GSE13507 was set as the validation cohort. We constructed a prognostic six‐IRG signature with LASSO Cox regression in the training cohort, including AHNAK, OAS1, APOBEC3H, SCG2, CTSE and KIR2DS4. Six IRGs reflected the microenvironment of bladder cancer, especially immune cell infiltration. The prognostic value of six‐IRG signature was further validated in the testing cohort and the validation cohort. The results of multivariable Cox regression and subgroup analysis revealed that six‐IRG signature was a clinically independent prognostic factor for bladder cancer patients. Further, we constructed a nomogram based on six‐IRG signature and other clinicopathological risk factors, and it performed well in predict patients' survival. Finally, we found six‐IRG signature showed significant difference in different molecular subtypes of bladder cancer. In conclusions, our research provided a novel immune‐related gene signature to estimate prognosis for patients' survival with bladder cancer.