Introducing vacancies into graphitic carbon nitride (g-C3N4) has emerged as a potent strategy to augment its photocatalytic performance. However, introducing vacancies on g-C3N4 via an efficient and environmentally friendly approach still remains a significant challenge. In this work, g-C3N4 photocatalysts enriched with nitrogen vacancies were successfully prepared by treating g-C3N4 with formic acid solution at room temperature. Incorporation of nitrogen vacancies significantly suppresses the recombination of e- /h+ and facilitates the utilization of electrons in photocatalytic reactions, thereby improving the photocatalytic efficiency. In addition, nitrogen vacancies provide abundant active sites and effective adsorption centers for CO2 molecules on the photocatalysts, further promoting the photoreduction process of CO2. Among them, the 15CN sample treated by 15 mL of formic acid exhibits the best photocatalytic performance. Under the irradiation of a 300 W xenon lamp, the conversion rate of CO2 to CO on the 15CN sample reaches 3.5 mu mol g- 1 h- 1, representing a 3.73-fold enhancement compared to that on the reference g-C3N4. In situ diffuse reflectance Fourier-transform infrared spectroscopy (DRIFTS) was utilized to investigate the process of CO2 conversion to CO on the surface of photocatalysts. In addition, the multifunctionality of the photocatalysts was further explored through photocatalytic hydrogen evolution (H2) experiments. Under a 300 W xenon lamp irradiation, photocatalytic H2 production rate on the 15CN sample reaches 1170.44 mu mol g- 1 h- 1, which is 1.24 times higher than that on the reference sample. This work provides a feasible strategy to enhance the photocatalytic performance of g-C3N4 using a mild approach for environmental purification and energy conversion applications.