Mesoporous H 3 PW 12 O 40 /TiO 2 and H 4 SiW 12 O 40 /TiO 2 were synthesized by combining sol-gel technology using a nonionic surfactant P123 as a structure directing agent with solvothermal treatment. X-ray diffraction and Raman spectroscopy results indicated that the TiO 2 particles had the anatase phase, and the primary Keggin structures of H 3 PW 12 O 40 and H 4 SiW 12 O 40 remained intact after calcination at 400 °C. N 2 adsorption-desorption analysis and scanning electron microscopy showed that the specific surface area and pore volume were increased by the addition of P123. The specific surface area of H 3 PW 12 O 40 /TiO 2 and H 4 SiW 12 O 40 /TiO 2 increased to 252.2 and 250.0 m 2 /g, respectively. Ultraviolet-visible absorption spectroscopy showed that compared with pure TiO 2 , an obvious red shift occurred and the absorption intensity was increased for the composite catalysts. The catalysts were tested and the degradation rate of dinitrotoluene was as high as 95% under the optimum conditions.