Tailored synthesis of mesoporous TiO2 was achieved using different glycine amounts. XRD can be indexed to the anatase and brookite phases for heterojunction TiO2. A/B-TiO2 exhibits higher photoactivity than pure TiO2 phases. A/B (61.8/38.2%) TiO2 shows 100% CYN degradation under UV–Vis irradiation.