In this study, several TiO2 mesoporous nanoparticles with different mol% of niobium and silver were synthesized using the sol–gel method. The crystalline phase, chemical state, photocatalytic and optical properties, specific surface area, and morphology of mesoporous nanoparticles were characterized by X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), UV–Vis reflective spectroscopy (UV–Vis), Brunauer–Emmett–Teller-specific surface area (BET) and field emission scanning electron microscopy (FESEM). With increasing calcination temperature, the photocatalytic activity of the samples gradually increased due to the improvement of crystallization of the anatase and rutile phases. Nb/Ag codoping sample calcined at 550 °C has reduced the band gap energy (3.17 eV to 3.06 eV) and improved the photocatalytic properties of samples under visible light (xenon lamp, 200W for 1 h and 2 h). Doped TiO2 mesoporous nanoparticles were shown to have the highest photocatalytic activity as compared with the pure TiO2 nanoparticles. The best photocatalytic efficiency of codoped TiO2 mesoporous nanoparticles was observed for the TNA3 sample calcined under 550 °C, containing molar contents of Nb (0.5 mol%) and Ag (1 mol%) dopant ions with 95.60% efficiency