Ordered mesoporous carbon materials (OMCs) were synthesized with the use of citric acid as an environmentally friendly catalyst to catalyze the polymerization of resorcinol/formaldehyde resin. The obtained carbon materials with high thermal stability have a 2D hexagonal mesopore system with uniform pore size of ∼5.2 nm and high surface area of 612∼851 m2 g−1, which were available under a wide composition range of reaction systems at the reaction temperature of 50–80 °C and the molar ratio of formaldehyde to citric acid of ≥3. The presence of citric acid in the synthesis system can enhance the hydrogen bonding between the triblock copolymer and resol and further introduce more micropores to the final carbon material, which is favorable for CO2 adsorption. The nitridation of the OMCs in ammonia flow at the temperature of 650–1000 °C is demonstrated to be effective in introducing basic functionalities that enhances the specific interaction of CO2 and adsorbent. The N-doped OMCs exhibit enhanced CO2 uptake with a CO2 capture capacity of 3.46 mmol g−1 for the 1000 °C-nitrided sample. Both textural and surface chemistry influenced the CO2 capture performance of the resultant mesoporous carbon adsorbents.