A two-step swelling method was used for preparing porous poly(ionic liquid)s based on the copolymer of 1-allyl-3-methylimidazolium tetrafluoroborate and acrylonitrile P([AMIM]BF4-AN), the copolymer of 1-allyl-3-methylimidazolium hexafluorophosphate and acrylonitrile P([AMIM]PF6-AN), and poly(vinylbenzyl trimethylammonium) tetrafluoroborate P[VBTMA]BF4. The characteristics of the polymers were assessed via FT-IR spectroscopy, scanning electron microscopy (SEM) and CO2 adsorption. The results indicated that the seed-swelling method was more effective in improving the CO2 adsorption capacity of imidazolium-based P([AMIM]BF4-AN) containing the [BF4]− anion. Exchanging [BF4]− for [PF6]− in the imidazolium-based poly(ionic liquid) led to almost the same CO2 adsorption as exhibited by the corresponding non-swelling copolymer. Moreover, the CO2 adsorption capacity of ammonium-based P[VBTMA]BF4 when treated by the seed-swelling method decreased considerably.