Consumption of contaminated water can have detrimental effects on the health of every living organism on earth. There is, thus, a need to develop novel materials and technologies to purify water. Water is also a source of hydrogen, a clean renewable fuel that can be generated through the action of a photoactive catalyst and the earth’s abundant solar energy. Using photocatalysis, we can purify water by removing organic pollutants through the photodegradation reaction (oxidation) and produce hydrogen (H2) through the hydrogen evolution reaction (reduction). However, we can combine these two reactions in a single process to achieve an efficient photocatalytic system. Herein, we report the dual-functional photocatalysis (DFP) on herbicide-contaminated water using TiO2 polymorphs derived from the amino-functionalized metal–organic framework (MOF), MIL-125-NH2. Heteroatom TiO2 doping led to the generation of N- and N,S-doped TiO2. Of all the pristine and doped TiO2 phases synthesized, the N,S-doped anatase (NSTA) was the best dual-functional photocatalyst in degrading glyphosate (PMG) with simultaneous H2 production at a rate of 660 μmol g–1 h–1. Nuclear Magnetic Resonance studies indicate the preferential cleaving of PMG’s C–N bonds, here referred to as α and β C–N bonds, leading to the formation of glycine, formic acid, and phosphoric acid as the major degradation products. Density functional theory calculations indicate PMG’s activation through the carboxy and phosphoric acid groups on the surface of NSTA and through the phosphoric acid group on the surface of TiO2-rutile. Our results suggest that the catalytic activity of NSTA can be attributed to the templated impact of the parent MOF, owing to its porosity, redshifting of the band absorption edge toward the visible region, reduced energy bandgap, surface defects, and the presence of oxygen vacancies. The binding mode of PMG to NSTA and its degradation allowed us to test the photodegradation of other herbicides, such as glufosinate ammonium and 2,4-dichlorophenoxyacetic acid. Interestingly, our MOF-derived NSTA proved to be active in purifying water when all three herbicides were combined and produced H2 with a rate of 329 μmol g–1 h–1 simultaneously.