Increased CO2 emissions and air pollution impact the environment and human health. In this manner, new functionalized polyaminal-based polymers are synthesized via a one-pot polycondensation reaction of melamine with aldehyde monomers 2-bromo-1-naphthaldehyde and 2-hydroxy-1-naphthaldehyde to yield bromine- hydroxyl- functionalized polymer networks PAN-BrNA and PAN-HNA, respectively. The polyaminals porosity parameters were investigated and applied as an adsorbent for CO2 capture. FTIR, solid-state 13C NMR, and X-ray diffraction verified the PANs structure development. A scanning electron microscope and N2 adsorption-desorption methods were utilized to identify the porous properties of the polymers at 77 K. The Brunauer-Emmett-Teller (BET) surface area of PAN-BrNA and PAN-HNA is (16.6990 m2/g) and (716.7568 m2/g), respectively. At 273 K, PAN-BrNA and PAN-HNA can take CO2 gas up to (4.42786 cm3/g) and (47.55 cm3/g), respectively. The findings show that inserting functional groups has a significant impact on surface area and porosity parameters, as well as CO2 uptake.