This study aims to investigate the role of MSH6 in the diagnosis and prognosis of bladder cancer and its association with immune responses.Various analyses were conducted on The Cancer Genome Atlas (TCGA) data, and the results were validated using the Gene Expression Omnibus (GEO) database. The potential mechanism of MSH6 in bladder cancer was revealed using R tools, Gene Set Enrichment Analysis (GSEA), and Gene Ontology (GO) analysis. Bladder cancer patients admitted to the Affiliated Hospital of Inner Mongolia Medical University from June 2023 to December 2023 were enrolled. Pathological specimens of bladder cancer and adjacent tissues were obtained. The expression of MSH6 protein in bladder cancer and adjacent tissues was assessed by immunohistochemistry. High expression of MSH6 was identified as an independent prognostic factor for bladder cancer. The occurrence of bladder cancer was also influenced by age, pathological T stage, and pathological stage. According to the Kaplan-Meier survival curve, the overall survival rate of the MSH6 high-expression group was lower (P=0.003). Immunohistochemical results showed the expression of MSH6 in bladder cancer tissues was higher than in adjacent tissues. GSEA revealed a close association between MSH6 and the immune system. MSH6 may play a key role in immune infiltration in bladder cancer. MSH6 is closely related to the diagnosis and prognosis of bladder cancer, suggesting its potential utility as a biomarker for the diagnosis and prognosis of bladder cancer. MSH6 is closely related to the tumor immune microenvironment, implying a significant role in immunotherapy.