This study addresses water pollution challenges by employing photocatalysis as an effective solution. Titanium dioxide (TiO2) with unique characteristics is widely utilized in this approach. However, the design of nanosized TiO2 particles is crucial for enhancing photocatalytic performance during diazinon's photodegradation. As such, the TiO2 nanoparticles (NPs) were synthesized via the green sol‐gel method in this study, exhibit a mixed anatase‐brookite phase, a small particle size of 11.17 nm, and lower bandgap energy (3.00 eV) than pure anatase TiO2 of 3.20 eV, rendering them active under visible light. DFTB calculation was deployed to investigate the role of oxygen vacancies in reducing the bandgap energy. Experimentally measured (3.00 eV) and computationally (2.812 eV) determined bandgap energies align well. The TiO2 NPs demonstrate significant photocatalytic efficacy, degrading 73.3 % of diazinon within 210 min under sunlight, with a mineralization degree of 43.50 %, and 2‐isopropyl‐6‐methylpyrimidin‐4‐ol (IMP) was detected as the intermediate product. The photodegradation follows first‐order kinetics, and adsorption isotherm analysis fits the Langmuir model. ⋅O2− is identified as the predominant reactive oxygen species in the diazinon's photodegradation. Hence, the synthesized TiO2 NPs offer good reusability, maintaining a degradation efficiency of 67.4 % even after five cycles, showing good potential for wastewater treatment applications.