The direct esterification reaction of CO2 with methanol to produce dimethyl carbonate (DMC) provides a sustainable pathway for the resourceful utilization of CO2. However, the chemical stability of CO2 makes the reaction kinetically difficult with low methanol conversion and DMC yields. In this study, a series of catalysts (denoted as M-CeO2, M = Fe, Cu, Co, La, Zr, Ni, and Al) with oxygen vacancy defects were constructed by a doping strategy, which provided critical sites for the adsorption and activation of methanol and CO2. Additionally, 2-cyanopyridine (2-CP) was employed as a dehydrating agent to facilitate the esterification reaction through dehydration. Under the optimized experimental conditions, the conversion of methanol was 61.9% and the DMC yield was 61.6%. The experimental and characterization results show that the extensive oxygen vacancies and base sites on the surface of the 5% Co-CeO2 catalyst are crucial for activating methanol and CO2, which is the main reason for the high catalytic activity of the catalyst. In situ diffuse reflectance infrared Fourier transform spectroscopy (DRIFTS) effectively demonstrated the efficient activation of methanol and CO2 on the catalyst and further confirmed the formation of monomethyl carbonate species during the reaction process. The high catalytic performance was also demonstrated in the direct esterification of other monohydric alcohols, thus confirming the broad applicability of the catalyst. This study presents a viable approach for the efficient utilization of CO2 resources, offering a promising solution for the sustainable management of greenhouse gas.