In order to achieve an aerogel with both rigid pore structures and desired flexibility, stiff carboxyl-functionalized cellulose nanofiber (CNFs) were introduced into a flexible polyvinyl alcohol-polyethyleneimine (PVA-PEI) crosslinking network, with 4-formylphenylboronic acid (4FPBA) bridging within the PVA-PEI network to enable dynamic boroxine and imine bond formation. The strong covalent bonds and hydrogen connections between CNF and the crosslinking network enhanced the wet stability of the aerogel while also contributed to its thermal stability. Importantly, the harmonious coordination between the stiff CNF and the flexible polymer chains not only facilitated aerogel flexibility but also enhanced its increased specific surface area by improving pore structure. Moreover, the inclusion of CNF enhanced the adsorption capacity of the aerogel, rendering it effective for removing heavy metal ions. The specific surface area and adsorption capacity for copper ions of the aerogel increased significantly with a 3 wt% addition CNF suspension, reaching 19.74 m2 g−1 and 60.28 mg g−1, respectively. These values represent a remarkable increase of 590.21 % and 213.96 %, respectively, compared to the blank aerogel. The CNF-enhanced aerogel in this study, characterized by its well-defined pore structures, and desired flexibility, demonstrates versatile applicability across multiple domains, including environmental protection, thermal insulation, electrode fabrication, and beyond.