Nitrogen and oxygen codoped porous carbons (NOCKs) were obtained by nitrogenization, preoxidation, and chemical activation. Considering the activation reagent amount and modification temperature, the pore structure conducive to CO 2 adsorption was obtained. NOCK-400-1 exhibits maximum CO 2 capacity of 6.77 mmol g −1 at 0 °C and 4.46 mmol g −1 at 25 °C, 1 bar. It also presents high dynamic CO 2 adsorption capacity under 15% CO 2 /85% N 2 at ambient temperature and excellent adsorption regenerability. The results show that the improvement of CO 2 adsorption performance is mainly due to the synergistic effect of codoping nitrogen and oxygen. The codoping method effectively improves the relative contents of pyrrolic-N, pyridinic-N, and phenolic hydroxyl with promoting the synthesis of amorphous carbon. Furthermore, the codoping method enhances the porosity of NOCKs with less consumption of KOH. The density functional theory (DFT) calculations also demonstrate two kinds of van der Waals actions (namely, dispersion interaction and electrostatic attraction) for CO 2 adsorption on the nitrogen and oxygen codoped carbon surface. Additionally, the physical adsorption mechanism on the heterogeneous surface of adsorbents is confirmed by adsorption isotherm and thermodynamic study. Therefore, nitrogen and oxygen codoped porous carbons are a promising sorbent for CO 2 capture, which provides the effective information for carbon design.