In this study, N-doping porous carbons (NPCs) with a 3D aperiodic hierarchical and layered structure were prepared by the sodium hydride (NaOH) activation of graphite nanofibers (GNFs)/polypyrrole (PPY) composites. The effects of the N groups and structural features on the CO2 adsorption capacity of NPCs were investigated by N2 full isotherms, XRD, SEM, and TEM. The CO2 adsorption capacity was measured by the CO2 isothermal adsorption at 25°C and 1 atm. It was found that GNFs served as a substrate and layered graphitic carbons were formed by the thermal annealing of PPY. The content of N groups and textural properties of NPCs were enhanced with increasing activation temperature, resulting in improved CO2 adsorption capacity. The CO2 adsorption isotherms showed that GPK-600 exhibited the best CO2 adsorption capacity of 88.8 mg/g when the activation temperature was 600°C. The result indicates that the pore size and its distribution of NPCs lead to feasible contact CO2, and the presence of high N groups on the NPCs could have resulted in further stabilization of the surface effect. © 2014 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2014, 131, 40517.