In conclusion, this research has successfully demonstrated the potential of ternary doped titanium dioxide (TiO2) photocatalysts, specifically BxCeyAgzTiO2, for the effective degradation of the antibiotic ampicillin and the disinfection of Escherichia coli under solar light. The synthesis of these photocatalysts using an eco-friendly citrate-EDTA complexing sol-gel method has resulted in materials with enhanced photocatalytic properties compared to their monodoped and codoped counterparts.