Recent studies have identified a urinary microbiome, dispelling the myth of urine sterility. Intravesical bacillus Calmette-Guérin (BCG) therapy is the preferred treatment for intermediate to high-risk non-muscle-invasive bladder cancer (BCa), although resistance occurs in 30-50% of cases. Progression to muscle-invasive cancer necessitates radical cystectomy. Our research uses 16S rRNA gene sequencing to investigate how the urinary microbiome influences BCa and its response to BCG therapy. Urine samples were collected via urethral catheterization from patients with benign conditions and non-muscle-invasive BCa, all of whom underwent BCG therapy. We utilized 16S rRNA gene sequencing to analyze the bacterial profiles and metabolic pathways in these samples. These pathways were validated using a real metabolite dataset, and we developed predictive models for malignancy and BCG response. In this study, 87 patients participated, including 29 with benign diseases and 58 with BCa. We noted distinct bacterial compositions between benign and malignant samples, indicating the potential role of the toluene degradation pathway in mitigating BCa development. Responders to BCG had differing microbial compositions and higher quinolone synthesis than non-responders, with two Bifidobacterium species being prevalent among responders, associated with prolonged recurrence-free survival. Additionally, we developed highly accurate predictive models for malignancy and BCG response. Our study delved into the mechanisms behind malignancy and BCG responses by focusing on the urinary microbiome and metabolic pathways. We pinpointed specific beneficial microbes and developed clinical models to predict malignancy and BCG therapy outcomes. These models can track recurrence and facilitate early predictions of treatment responses.