Artificial photosynthesis, harnessing solar energy to convert CO2 into hydrocarbons, presents a promising solution for climate change and energy scarcity. However, photocatalytic CO2 reduction often terminates at the CO stage due to limited electron transfer capacity, hindering the formation of higher-energy hydrocarbons such as CH4. This study introduces, for the first time, an in-situ atmosphere regulation strategy, refined from molecular imprinting methodologies, using dynamically reacting molecules to precisely engineer photocatalytic surface sites for selective *CO adsorption and hydrogenation in CO2-to-CH4 conversion. Specifically, the single-atom Cu catalyst (Cu-SA-CO) is prepared by anchoring single-atom Cu onto defective TiO2 substrates (Cu-SA-CO) under a CO reduction atmosphere. Under illumination, the catalyst exhibited outstanding CH4 selectivity (almost 100%) and productivity (58.5 µmolg-1h-1). Mechanistic investigations reveal that the coordination environment of the Cu single atoms is significantly affected by dynamically reacting molecules (CO and *CHxO) during synthesis, leading to a Ti-Cu-O structure. The structure, with the synergistic interaction between Cu single atoms and oxygen defects, significantly enhances *CO adsorption and hydrogenation, thereby promoting the formation of methane. This work pioneers the use of dynamically reactive molecules as imprinted templates to tune photocatalytic CO2 reduction selectivity, providing a novel avenue for designing efficient photocatalysts.