Nitrogen-doped microporous carbon spheres (CSs) were prepared by simultaneous carbonization and activation of nitrogen-doped polymer spheres obtained in the presence of potassium citrate. Both additional microporosity and nitrogen doping in CSs were achieved by using pyrrole as one of the carbon precursors. A very high CO2 uptake of 7.35 mmol g-1 at 0 ºC and 1 bar pressure was achieved for the carbon sample, which possessed the highest ultramicropore volume of 0.42 cm3 g-1 among all samples studied. Potassium citrate was shown to be an efficient in situ activator, which generated a high volume of ultramicropores below 0.8 nm at a temperature as low as 700 ºC, while the use of polypyrrole led to an additional ultramicroporosity in CSs. Microporosity was simply tuned in CSs by varying the potassium salt content in the synthesis mixture. The resulting CSs possessed narrow pore size distributions with a large fraction of micropores below 1 nm and exhibited high CO2 uptakes ranging from 3.30 mmol g-1 to 7.35 mmol g-1 at 0 ºC and 1 bar pressure, indicating the potential applicability of these carbons as CO2 sorbents.