Because of their abundant porosity, tunable surface properties, and high stability, N-doped porous carbons (NPCs) are highly promising for CO 2 capture. Carbonization of N-containing polymers is frequently used for the preparation of NPCs, while such an approach is hindered by the high cost of some polymer precursors. In the present study, we report for the first time the fabrication of NPCs through the rational choice of the low-cost, N-rich polymer NUT-2 (NUT indicates Nanjing Tech University) as the precursor, which was obtained from polymerization of easily available monomers under mild conditions in the absence of any catalysts. Through carbonization at different temperatures (500–800 °C), NPCs with various porosity and nitrogen contents are obtained. The pore structure and CO 2 -philic (N-doped) sites are responsible for the adsorption performance, while the highest surface area does not lead to the highest CO 2 adsorption capacity. For the sample carbonized at 600 °C (NPC-2-600), the adsorption capacity on CO 2 is as high as 164.7 cm 3 g –1 at 0 °C and 1 bar, which is much better than that of the benchmarks, such as activated carbon (62.5 cm 3 g –1 ) and 13X zeolite (91.8 cm 3 g –1 ), as well as most reported carbon-based adsorbents. We also demonstrate that the present NPCs can be regenerated completely under mild conditions. The present adsorbents may provide promising candidates for the capture of CO 2 from various mixtures, such as flue gas and natural gas.