An innovative strategy for post-synthesis nitrogen-doping of mesoporous carbons (MCs) with high yields (>90%) at low temperatures (230-380 °C) by using a strong base, sodium amide (NaNH2), was developed. The as-prepared N-doped MCs exhibit a significantly enhanced CO2 adsorption performance in terms of capacity and selectivity when compared to their parent MCs.