The elution of pharmaceutical products such as metformin at higher concentrations than the safe level in aquatic systems is a serious threat to human health and the ecosystem. Photocatalytic technology using TiO2 semiconductors potentially fixes this problem. This study aims to synthesize triphasic anatase–rutile–brookite TiO2 using ultrasound assisted sol–gel technique in the presence of acid and its application to photodegradation of metformin under UV light irradiation. Based on X-ray diffraction analysis, a TiO2 sample consisted of anatase (76%), rutile (7%), and brookite (17%) polymorph (A76R7B17) that was fully crystallized. Scanning electron microscopy (EM)–energy dispersive X-ray spectra results showed agglomerated triphasic A76R7B17 with irregular spherical clusters. Transmission EM results revealed that the crystal size of A76R7B17 was 4–14 nm. The Brunauer–Emmett–Teller analysis showed the sample's specific surface area of 149 m2 g−1. The degradation test of metformin demonstrated that the A76R7B17 exhibited a 75.4% degradation efficiency after 120 min under UV light irradiation, significantly higher than using biphasic and single-phase TiO2 photocatalysts. This difference could be attributed to the heterojunction effect of triphasic materials that effectively reduced electron–hole recombination rate as well as the combination of effective electron transfer from conduction band of brookite and anatase and the utilization of wider range of UV–visible light using rutile.