Nanoporous carbons with a high specific surface area were prepared directly from thermoplastic acrylic resin as carbon precursor and MgO powder as template by carbonization over the temperature range, 500-1000 °C. The effect of the carbonization temperature on the pore structure and CO 2 adsorption capacity of the obtained porous carbon was examined. The textural properties and morphology of the porous carbon materials were analyzed by N 2 /−196 °C and CO 2 /0 °C adsorption/desorption isotherms, SEM and TEM. The CO 2 adsorption capacity of the prepared porous carbon was measured at 25 °C and 1 bar and 30 bar. The specific surface area increased from 237 to 1251 m 2 /g, and the total pore volumes increased from 0.242 to 0.763 cm 3 /g with increasing the carbonization temperature. The carbonization temperature acts mainly by generating large narrow micropores and mesopores with an average pore size dependent on the level of carbonization of the MgO-templated nanoporous carbons. The results showed that the MgO-templated nanoporous carbons at 900°C exhibited the best CO 2 adsorption value of 194 mg/g at 1 bar.