Two-dimensional (2D) materials have been extensively studied in recent years due to their unique properties and great potential for energy-related applications. Recently, surface defects or vacancies in catalysts are reported to promote catalytic reaction, such as hydrogen evolution reaction (HER) and CO2 reduction reaction (CO2RR). Activation and dissociation processes of CO2 can be controlled by tailoring their electronic structures, charge transport and surface properties. To gain in-depth atomic-level understanding on the correlation between the catalytic surface and reaction mechanism, we have utilized the near-ambient pressure X-ray photoelectron spectroscopy (APXPS) to monitor our reaction in-situ/operando. Here, the MoS2 thin layers were prepared by vapor transport deposition, followed by hydrogen plasma post-treatment to create S vacancies with controlled concentrations. We observed that the defective surfaces of MoS2 are more active than its pristine counterpart to split CO2 under light illumination. Furthermore, the presence of defects helps transforming CO2 into useful fuels, such as acetaldehyde, acetone, methanol and ethanol, with better selectivity. APXPS data showed that during reaction, CO2 formed several intermediates, including physisorbed or chemisorbed CO2 states. In addition, with the introduction of H2O, formation of oxygenate species, such as hydroxyl, formate or methoxy groups were observed. Valence band offset was also observed due to surface band bending during reaction. Through APXPS study of the electronic structure and active sites during catalytic reaction, we can have improved understanding of the underlying mechanism involved in catalytic reaction, and gain insights in designing and improving carbon dioxide reduction catalysts.