Solar energy can be used to convert CO2 into valuable chemical compounds. However, the low activity of photocatalysts has hindered their development. By using defective g-C3N4/CeO2 heterojunctions, CO2 was successfully photo-reduced with high performance under ambient water vapor conditions without adding additives. g-C3N4 in this system has a significant impact on CO2 conversion efficiency, with 5 wt% g-C3N4/CeO2 exhibiting competitive performance, achieving 45.66 μmol/g CO in 6 h with nearly 100% selectivity. Photoactivity is attributed to the formation of g-C3N4/CeO2 heterojunctions, which provide excellent electron transport and electron-hole separation. Additionally, light enhances the CO2 adsorption capacity of the catalyst, thereby improving reaction properties. The photogenerated electrons generated under light excitation can quickly gather at the surface and defective parts of the sample, facilitating effective CO2 adsorption and promoting the formation of *COOH, thus promoting the photoreduction process of CO2. Cycle tests also demonstrate long-term stability. Highly efficient charge separation and reduced free energy of CO2 reduction both promote CO2 conversion performance. This work can provide an important idea for designing CeO2-based CO2 photocatalysts.