Few studies have investigated the potential of tumor immune microenvironment genes as indicators of urinary bladder cancer. Here, we sought to establish an immune-related gene signature for determining prognosis and treatment options. We developed a ten-gene tumor immune microenvironment signature and evaluated its prognostic capacity on internal and external cohorts. Multivariate Cox regression and nomogram analyses revealed the prognostic risk model as an independent and effective indicator of prognosis. We observed lower proportions of CD8+ T cells, dendritic cells, regulatory T cells, higher proportions of macrophages and neutrophils in high UBC risk group. UBC tissues with high-risk score tend to exhibit high TP53 and RB1 mutation rates, high PD1/PD-L1 expression and poor-survival basal squamous subtypes, while those with low-risk score tend to have high FGFR3 mutation rates and luminal papillary subtypes. Unexpectedly, we found a highly significant positive correlation between glycolytic genes and risk score, highlighting metabolic competition in tumor ecosystem and potential therapeutic avenues. Our study thus revealed a tumor immune microenvironment signature for predicting prognostic and response to immune checkpoint inhibitors against bladder cancer. Prospective studies are required to further test the predictive capacity of this model.