Current environmental and energy issues urge the advance of stable and cost-effective porous nanostructures for highly efficient electrochemical energy conversion/storage, and gas adsorption/separation. Herein, we report a one-pot, scalable pyrolysis process for fabrication of hierarchically layer-structured porous carbons with nitrogen doping and cobalt modification (Co-N-PCs) for efficient high-pressure CO2 gas adsorption and oxygen reduction reaction (ORR). Co-N-PCs possess large specific surface areas and abundant layered macropores containing micropores and narrow mesopores, coupled with core-shell Co@C/CoOx structure. Co-N-PC 800 (synthesized at 800 °C) shows a high CO2 capture capability of 18.5 mmol g−1 at 10 bar (0 °C) and an outstanding catalytic activity for ORR. Density functional theory (DFT) calculations reveal that the cobalt cores inside graphene layers powerfully promote electron transfer from Co to surrounding C atoms, which work together with doped N to create superior catalytically active sites in the graphene shells. In addition, the negative charge states of C induced in N-doped Co@C structure contribute to the capture of CO2.