The nanostructure and doping of heteroelements are considered crucial for the photocatalytic reduction of CO2. Herein, we report the development and optimization of a mesoporous photocatalyst for the CO2 photoreduction (CO2PR) reaction through the integration of TiO2 with a CMK-3 template and template removal, followed by a focused study of silver-doping strategies using photodeposition and synchronous doping. Through investigating the effects of the charge-carrier recombination rates and acid/base behavior on CO2PR efficiency and product selectivity, we revealed that the influence on the CO2PR reaction follows the order of Lewis acid sites > Lewis base sites > charge-carrier recombination rates. Our proposed mechanism suggests that the Lewis acid sites regulate H+ production and control the CO and CH4 production rates and selectivity. In addition, we demonstrate irradiation-induced Lewis acid/base behavior of the photocatalyst by NH3-/CO2-temperature programmed desorption. Accordingly, our engineered photocatalyst comprising 1% synchronous Ag-doped mesoporous TiO2 calcinated at 470 °C (S-Ag1.0TC470) exhibited 96% CH4 selectivity and an 11-fold higher production yield than that of commercial P25.