Nitrogen-containing porous carbon fibers with a large BET surface area (919−1625 m 2 /g) and pore volume (0.429−0.772 cm 3 /g) were developed from polyimide fiber, which was treated in the presence of potassium carbonate by one-step simultaneous carbonization/activation. The effect of carbonization temperature on the porous and chemical structure was monitored. The nitrogen contents of activated carbon fibers decreased with the treatment temperature, which varied in a range of 1.23−2.76 wt %. Compared with the unactivated fiber, the activated ones showed more ultramicropores with a volume of more than 0.279 cm 3 /g. An optimal activated sample exhibited an excellent CO 2 uptake of 5.0 mmol/g at 1 bar and 25 °C, with an acceptable Henry's CO 2 /N 2 selectivity of 24. The ultramicropore played a predominant effect on the CO 2 uptake capacity, while the nitrogen functionalities played a predominant effect on the CO 2 /N 2 selectivity.