Nanoporous carbons, as promising adsorbents for CO 2 capture and separation from flue gas, span the major challenge of optimizing the physicochemical property to meet the need of CO 2 capture and separation. Herein, we rationally engineered sustainable nanoporous carbons with tailorable porosity and rich surface chemistry using an activating agent of small-molecule organic acids. The porosity could be easily tailored by varying the activation temperature and activator dosage. The surface chemistry and morphology could be tuned by changing the dopant concentration. In detail, porosity played a determinant role in CO 2 adsorption capacity, especially ultramicroporosity. Narrow micropores brought major contributions to CO 2 uptake at low pressure, while mesopores played a great role at high adsorption pressure. Surface chemistry played a critical role in CO 2 capture, especially adsorption selectivity and the isosteric heat of adsorption when the ultramicroporosity was optimal. We revealed that the C−OH group (one type of oxygen-containing species) made a relatively high contribution for improving CO 2 capture by hydrogen bonding. For nitrogen-containing groups, the pyridinic-N, pyrrolic-N, and amine groups provoked more improvements in CO 2 capture by offering more basic CO 2 -philic sites, while the oxidized-N group made a weak influence. Sheet-like structures exhibited more accessible affine sites for fast CO 2 capture and separation. We proposed a valuable reference for rationally engineering nanoporous carbons with the optimal texture to meet the different requirements of CO 2 capture. More importantly, the conversion of biowaste into high-added-value adsorbents for effective CO 2 capture and separation opened up an elegant route of killing two birds with one stone.