Urinary bladder cancer (BC) inflicts a significant impairment of life quality and poses a high mortality risk. Schistosoma haematobium infection can cause BC, and the urinary microbiota of BC patients differs from healthy controls. Importantly, intravesical instillation of the bacterium Bacillus Calmette-Guerin stands as the foremost therapy for non-muscle invasive BC. Hence, studying the receptors and signaling molecules orchestrating bacterial recognition and the cellular response in the context of BC is of paramount importance. Thus, we challenged Toll-like receptor 4 (Tlr4) and myeloid differentiation factor 88 (Myd88) knock-out (KO) mice with N-butyl-N-(4-hydroxylbutyl)-nitrosamine (BBN), a well-known urinary bladder carcinogen. Gut microbiota, gene expression, and urinary bladder pathology were followed. Acute exposure to BBN did not reveal a difference in bladder pathology despite differences in the animal's ability to recognize and react to bacteria. However, chronic treatment resulted in reduced cancer invasiveness among Myd88KO mice while the absence of functional Tlr4 did not influence BC development or progression. These differences correlate with a heightened abundance of the Faecalibaculum genus and the lowest microbial diversity observed among Myd88KO mice. The presented data underscore the important role of microbiota composition and MyD88-mediated signaling during bladder carcinogenesis.