The efficient capture of carbon dioxide (CO2) by porous ionic liquids (PILs) has become one of the important ways to deal with the greenhouse effect and enhance environmental protection. In order to enhance the CO2 capture efficiency of PILs, 2 amino-functional ionic liquids (ILs) were synthesized in deionized water: tetraethylenepentamine-2-methylimidazole ([TEPA][MIm]) and diethylenetriamine-2-methylimidazole ([DETA][MIm]). 2 zeolite imidazolidin-8 frames (ZIF-8-W and ZIF-8-M) were prepared in methanol and deionized water. The performance of the material was verified through FT-IR infrared spectroscopy, TGA-DTG curves, XRD spectra, adsorption desorption curves, and corrosive changes. Based on this, the porous ionic liquid ZIF-8-W/[TEPA][MIm] with the best performance and ZIF-8-W with the best environmental friendliness were successfully constructed. The chemical reaction mechanism of CO2 in PILs were explored. The results showed that the thermogravimetric temperature of all materials was greater than 370 K, and the difference in adsorption capacity between ZIF-8-W and ZIF-8-M was only about 36.3 ml/g, the maximum mass change rates of the two ILs after immersion in ceramic and stainless steel tubes for 7 days were only 0.78 % and 0.29 %, respectively. On the premise of ensuring fluidity, the maximum capture capacity of ZIF-8-W/[TEPA][MIm] for pure CO2 reached 2.22 mol/mol PILs, and the maximum capture capacity for CO2 in artificial flue gas reached 2.03 mol/mol PILs, which was 21.9 % and 31.6 % higher than the maximum capture capacity of pure ionic liquids, respectively. When [TEPA][MIm] in PILs reacts with CO2, it conforms to the characteristics of "zwitterions".