BackgroundAs one of the most prevalent genitourinary cancers, bladder cancer (BLCA) is associated with high morbidity and mortality. Currently, limited indicators are available for early detection and diagnosis of bladder cancer, and there is a lack of specific biomarkers for evaluating the prognosis of BLCA patients. This study aims to identify critical genes that affect bladder cancer immunity to improve the diagnosis and prognosis of bladder cancer and to identify new biomarkers and targets for immunotherapy.MethodsTwo GEO datasets were used to screen differentially expressed genes (DEGs). The STRING database was used to construct a protein-protein interaction network of DEGs, and plug-in APP CytoHubba in Cytoscape was used to identify critical genes in the network. GO and KEGG analyses explored the functions and pathways of differential gene enrichment. We used GEPIA to validate the expression of differential genes, their impact on patient survival, and their relationship to clinicopathological parameters. Additionally, hub genes were verified using qRT-PCR and Western blotting. Immune infiltration analysis and multiple immunohistochemistry reveal the impact of Hub genes on the tumor microenvironment.ResultWe screened out 259 differential genes, and identified 10 key hub genes by the degree algorithm. Four genes (ACTA2, FLNA, TAGLN, and TPM1) were associated with overall or disease-free survival in BLCA patients and were significantly associated with clinical parameters. We experimentally confirmed that the mRNA and protein levels of these four genes were significantly decreased in bladder cancer cells. Immunoassays revealed that these four genes affect immune cell infiltration in the tumor microenvironment; they increased the polarization of M2 macrophages.ConclusionThese four genes affect the tumor microenvironment of bladder cancer, provide a new direction for tumor immunotherapy, and have significant potential in the diagnosis and prognosis of bladder cancer.