The escalating persistence and toxicity of organic pollutants have caused significant environmental problems. Moreover, conventional treatment technologies often fail to completely degrade these pollutants, prompting the development of advanced oxidation processes. In this context, titanium dioxide (TiO2) is one of the most promising photocatalysts due to its chemical stability, non-toxicity, abundance, and strong oxidative power. However, its practical application is limited by its wide band gap and weak visible-light response, which restricts its performance under solar irradiation. Herein, we report the synthesis and characterization of a visible-light-active N-doped titania (N/ TiO2) photocatalyst. The N/ TiO2 material was prepared via a facile sol–gel route using titanium butoxide and an eco-friendly N-dopant source. The synthesized anatase/brookite/rutile ternary-phase N/ TiO2 was characterized using various spectroscopic and analytical techniques. Its photocatalytic performance was evaluated through the degradation of methylene blue (MB) under visible light. Key operating parameters, including the amount of N/ TiO2, the initial MB concentration, pH, and illumination duration, were optimized to achieve the highest MB degradation efficiency. The results showed that the optimized N/ TiO2 possesses a mesoporous triphasic structure with an anatase:rutile:brookite ratio of 4:3:1. Importantly, it exhibited a high degradation activity of 99.5% within 90 min of visible-light irradiation at pH 11.0, along with a faster degradation rate of 0.0604 min-1. This rate is 4 and 29 times higher than those of unoptimized N/ TiO2 and undoped TiO2, respectively. This enhancement is attributed to the synergy between the optimized ternary phase composition, reduced band gap energy, improved light absorption, well-separated charge carriers, and N-doping. Overall, the optimized N-doped photocatalyst demonstrates practical potential for the demineralization/remediation of water pollutants in aqueous systems.