## Introduction

Rapid urbanization and industry expansion have caused massive increases in inorganic and organic pollutants in natural water, which are heavily connected with public health and water quality1,2,3. Various industries discharge their heavy metals, organic dyes and poly cyclic aromatic hydrocarbons (PAH) into the aquatic systems without a proper purification process from among those pollutants. The removal of toxic metals1,2,3, organic dyes4 and poly cyclic aromatic hydrocarbons (PAH)5,6,7,8 from environmental waters have recently been regarded as one of the most essential issues to obtaining clean water due to their environmental persistency and extreme toxicity. In response to this requirement, several procedures have been introduced to purify heavy metals and organic dye-polluted water, including photo-catalysis9, flocculation10, biodegradation11, membrane separation12, and adsorption13 techniques. Among them adsorption-related methods have been intensively utilized to remove different pollutants due to their cost-effective operation, high capture efficiency and very limited secondary pollutions are created. To identifying an appropriate adsorbent is expected to fulfill the following criteria: (1) high adsorption capability for diverse pollutants at low concentrations; (2) excellent reusability without sacrificing surface binding sites; (3) fast adsorption rate in complex matrices.

According to the above principles, numerous adsorbents have been proposed to remediate environmental pollutants, exemplified by activated carbon14, graphene oxide-based composites15, synthetic polymers16, co-ordination polymers17, metal-organic frameworks18, covalent organic framework19, and surfactant-anchored biopolymer20. Recently, hexagonal boron nitride (h-BN) displays a promising alternative for capturing environmental pollutants owing to its highly porous structure, polar B–N bonds, and sp2 hybridization. The reported h-BN-related materials include BN spheres2, h-BN whiskers21, BN nanosheets (BNNSs)22, cheese-like 3D BN23, chemically activated BN fibers24 and BN hollow spheres25. Moreover, introducing a suitable agents can functionalize through their h-BN surface with specific groups can efficiently interacting with adsorbates. This synergistic effect enables the h-BN-related adsorbents to have multiple binding sites to interact with diverse environmental pollutants26,27,28. As an example of heavy metals sorption, the polar B–N bonds obtained from h-BN-related materials could electrostatically attract toxic metal cations through their surface, such as Cr(III)1,2,3,27, Cu(II)1,2, and Pb(II)1,2,3. Moreover, the h-BN-based porous materials exfoliated with polyaniline further decorated by magnetite nanoparticles (Fe3O4 NPs) were well-suited for the uptake of Cr(VI)26 and As(V)28, respectively. In another example, the h-BN-related porous adsorbent can efficiently remove cationic and anionic dyes from environmental water through their π-π interactions, structural defects and polar B–N bonds1,2,3,21,22,23,24,25. Although recent literature studies shows the potential behavior to remove environmental pollutants from an aqueous system, these BN-based porous adsorbents suffer from insufficient adsorption capacity due to their hydrophobic nature and low surface-to-volume ratio. It is worth mentioning that the maximum adsorption capacity values of those above-discussed adsorbents were reported to be 10–133 mg g−1 for Cr(VI)26, 10–30 mg g−1 for As(V)28 and 10–392 mg g−1 for methylene blue (MB)2,22,23,24,25, in sequence.

## Results

### Fabrication and characterization of the h-BNNS-related nanomaterials and aerogels

Figure 1 illustrates the synthetic procedure for the PEI-h-BNNSs, PEI-h-BNNSs@Fe3O4 NPs, and MHAs. Previous studies have demonstrated that planar melamine molecules have three amino groups, forming hydrogen bonds with boric acid29,30. The formed hydrogen-bonded molecular frameworks can serve as a precursor to obtain h-BN whiskers30. Accordingly, this study prepared the h-BN whiskers via thermal poly-condensation of melamine and boric acid, followed by pyrolysis31. After exfoliating the h-BN whiskers with ultra-sonication, the resultant h-BNNSs were modified with PEI to enhance dispersity and adsorption capability. It is noted that the functionalization of PEI on the h-BNNS surface is attributable to Lewis acid-base interaction32. We next incorporated the as-developed PEI-h-BNNSs into the base-mediated co-precipitation of Fe (III) and Fe (II). Considering that a lone pair of electrons from a nitrogen atom can coordinate with Fe (III) and Fe (II)33, the Fe3O4 NPs were in-suit formed on the PEI-h-BNNS surface. Electron microscopy techniques and Raman spectroscopy were implemented to characterize the as-prepared PEI-h-BNNSs. Figure 2a, b displays the low-magnification transmission electron microscopy (TEM) images of PEI-h-BNNSs, demonstrating the formation of 100–200 nm-sized nanosheets with a smooth surface. The atomic inter-planar distance of the PEI-h-BNNSs in the high-resolution TEM image reveals their inter-planar spacing of 0.33 nm (Fig. 2c), which is indexed to the (002) plane of h-BN crystals. The selected area electron diffraction (SAED) of the PEI-h-BNNSs shows multiple diffraction rings, reflecting their polycrystalline nature (Fig. 2d). The thickness of the PEI-h-BNNS, estimated by line profiles from atomic force microscopy (AFM) image, was less than 2 nm (inset in Fig. 2e). The layer number of PEI-h-BNNS was suggested to be nearly 6 according to the theoretical interlayer distance of h-BN corresponding to 0.34 nm. The aggregated spots in the AFM image could result from the increased interaction among the PEI-h-BNNSs during the sample evaporation33. The analyses from h-BN whiskers, PEI-h-BNNSs and PEI-h-BN quantum dots by Raman spectroscopy reveals that the characteristic D band at 1376 cm−1 (Fig. 2f), which is assigned to E2g vibration mode of h-BN34,35,36,37. The full width at half maximum of an identified D band was determined to be approximately 10 cm−1, reflecting that the above-mentioned materials possess a high-crystalline structure38,39. Additionally, the Raman intensity of the D band in these BN-related porous materials following the order: h-BN whiskers > PEI-h-BNNSs > PEI-h-BN quantum dots. Given that, Raman intensity of the D band is proportional to the layer number of h-BN38,39, we point out that the as-prepared PEI-h-BNNSs are indeed and exfoliated to few-layer structures.

In the subsequent study, we confirmed the formation of PEI-h-BNNSs@Fe3O4NPs and compared them with PEI-h-BNNSs and Fe3O4 NPs. The low-magnification TEM images of PEI-h-BNNSs@Fe3O4 NPs reveal that numerous spherical Fe3O4 NPs were attached to the edges of PEI-h-BNNSs (Fig. 3a, b). As shown in the corresponding high-resolution TEM image of Fig. 3c, the PEI-h-BNNSs@Fe3O4 NPs exhibited distinct lattice fringes with d-spacing of 0.33 and 0.21 nm corresponding to the (002) and (100) lattice planes of h-BNNSs (Fig. 3c) and cubic Fe3O4 NPs (Supplementary Fig. 1), respectively. The SAED ring pattern of PEI-h-BNNSs@Fe3O4 NPs reflects their polycrystalline structure (Fig. 3d). Moreover, the chemical composition of PEI-h-BNNSs@Fe3O4 NPs was evidenced by TEM equipped with energy dispersive spectroscopy (EDS). The EDS spectrum of PEI-h-BNNSs@Fe3O4 NPs displayed a series of peaks which corresponding to B, N, O and Fe elements (Fig. 3e). These observations confirm that the Fe3O4 NPs could be in situ formed on the PEI-h-BNNS surface edges through their direct binding of Fe(II) and Fe(III) with the PEI-h-BNNSs28,40,41. The X-ray diffraction (XRD) technique was utilized to support the formation of composites PEI-h-BNNSs@Fe3O4 NPs and Fe3O4 NPs. Because of the crystalline behavior of PEI-h-BNNSs@Fe3O4 NPs, which provides two intense XRD peaks at 2θ angles of 27.9° and 30.3°corresponded to the (002) planes of h-BN whiskers28,40,41 and (220) plane of cubic Fe3O4 NPs28,40, respectively (Fig. 3f). A comparison between the main XRD peak of PEI-h-BNNSs@Fe3O4 NPs and that of the PEI-h-BNNSs@Fe3O4 NPs has a slight difference in the 2θ angle value, a similar result were also detected in the XRD measurement of Fe3O4 NPs. These findings are signified that the strong attachment of Fe3O4 NPs to the nanosheet edges28,40. The effect of solution pH on the surface charges of PEI-h-BNNSs, Fe3O4 NPs and PEI-h-BNNSs@Fe3O4 NPs was examined by zeta potential measurements. As indicated in Fig. 3g, the zero-point charge (pHzpc) values were found to be 9.3, 6.8 and 8.1 for the PEI-h-BNNSs, Fe3O4 NPs and PEI-h-BNNSs@Fe3O4 NPs, respectively28,40,42. The great pHzpc value of PEI-h-BNNSs originates from the high content of amino (−N, − NH, and −NH2) residues on their surfaces28,34,35,40,41,42,43. Besides, the pHzpc value of the PEI-h-BNNSs@Fe3O4 NPs falls between those of the Fe3O4 NPs and PEI-h-BNNSs, confirming the conjugation of Fe3O4 NPs onto the PEI-h-BNNS surface edges28,40,41,42,43. The above-discussed results demonstrate that the surface charges of PEI-h-BNNSs@Fe3O4 NPs can be tuned by adjusting their solution pH. As indicated in Supplementary Fig. 2, the saturation magnetization values of Fe3O4 NPs and the proposed PEI-h-BNNSs@Fe3O4 NPs were estimated to be 120 and 74.6 emu g−1, respectively40,41,42. The difference in the magnetization between the two nanomaterials mentioned above arises from the non-magnetic of PEI-h-BNNSs in the PEI-h-BNNSs@Fe3O4 NPs. Additionally, these two nanomaterials exhibit zero coercivity and remanence without the hysteresis loop, reflecting their super-paramagnetic behavior. In other words, the proposed PEI-h-BNNSs@Fe3O4 NPs can be collected by applying an external magnetic field at ambient temperature42.

As examined by Fourier-transform infrared spectroscopy (FT-IR), the PEI-h-BNNSs@Fe3O4 NPs displayed apparent FT-IR peaks at 808, 1105, 1377 cm−1 associated with out-of-plane bending vibration of B–N–B bond, symmetric stretching vibration of B–O bond, and in-plane stretching vibration of B–N bond as indicated in Supplementary Fig. 3a44,45. In contrast to FT-IR spectra of h-BN whiskers and PEI-h-BNNSs (Supplementary Fig. 3b, c), a slight shift in the boron-related FT-IR peak positions from PEI-h-BNNSs@Fe3O4 NPs which signifies that, the strong interaction between h-BNNSs with PEI polymers and Fe3O4 NPs. Furthermore, the additional vibrational modes of N–H (3383 and 1657 cm−1), –CH2 (2956 and 2827 cm−1), and Fe−O (572 cm−1) reflects the successful modification of PEI polymers and Fe3O4 NPs on the h-BNNS surface28,40,41,46.

The successful synthesis of PEI-h-BNNSs@Fe3O4 NPs encourages us to fabricate the MHAs through their freeze-drying process (Fig. 1). The as-made PEI-h-BNNSs@Fe3O4 NPs could exhibit hydroxyl and amine groups to form hydrogen bonding with hydroxyl groups from polyvinyl alcohol (PVA), which is intensively used to fabricate aerogels through the freeze-drying process47,48,49,50. Therefore, the PEI-h-BNNSs@Fe3O4 NPs were blended with a PVA solution to obtain PVA hydrogels. The resultant homogenous mixture was freeze-dried to remove water molecules from PVA frameworks, producing a porous structure of the MHA. The scanning electron microscopy (SEM) images show the polygonal porous structure of MHAs with a pore size ranging from 1.0 to 10 μm (Fig. 4a, b). The formation of this porous structure could be correlated with random assembly of the PEI-h-BNNSs@Fe3O4 NPs and PVA. As depicted in Fig. 4c–e show digital photographs of the PEI-h-BNNSs, Fe3O4 NPs and PEI-h-BNNSs@Fe3O4 NPs-loaded PVA aerogels, in sequence. Intuitively, the decoration of PEI-h-BNNSs with Fe3O4 NPs caused a color change from white to black. Compared to the Fe3O4 NPs-loaded PVA aerogels, the porous structure of MHAs (i.e., PEI-h-BNNS@Fe3O4 NP-loaded PVA aerogels) is relatively rigid and compact. Moreover, the MHAs were capable of standing on a leaf, demonstrating their ultralight and low-density behavior (Fig. 4f). The proposed MHAs adsorption ability and magnetic properties were separately determined by Brunauer-Emmet-Teller (BET) analysis and superconducting quantum interference device (SQUID) magnetometry. As indicated in Fig. 4g, the BET curve of MHAs belonged to a type-IV isotherm, indicating their well-formed mesoporous mature. The presence of a narrow H3-type hysteresis loop reflects that the measured materials could include slit-shaped pores on account of the assembly of nanosheets51.

The BET surface area, pore volume and pore diameter of the present MHAs were determined to be 104.6 m2 g−1 0.13 cm3 g−1 and 16.4 nm (Supplementary Fig. 4) which fall between of h-BN whiskers and Fe3O4 NPs-loaded PVA aerogels (Supplementary Table 1). The existence of long PEI chains and Fe3O4 NPs could distort π-π stacking interaction between two adjacent h-BN layers, inducing a reduction in the porosity of MHAs relative to the h-BN whiskers-loaded PVA aerogels26,28,32,34,35,47,48. In short, we reason that the mesoporous behavior could act as an efficient and reusable adsorbent due to their three-dimensional mesoporous structure, an enlarged surface area, diverse functional groups and good super-paramagnetic behavior.

### Adsorption of Cr(VI) and As(V) by the MHAs

Hexavalent chromium [Cr(VI)] is intensively used in the tannery, textile and steel fabrication1,2,3,13,26, while arsenic, existing as arsenite [As(III)], and arsenate [As(V)], discharge into different environmental surroundings via geothermal process and mineral deposits28. The maximum permissible concentrations of arsenic and chromium by the World Health Organization (WHO) are 10 and 50 ppb in drinking water1,2,3,13. According to their toxicity to human health and aquatic organisms, Cr(VI) and As(V) were selected as example contaminates to test their sorption capability of the as-proposed MHAs. As indicated in Fig. 5a, the maximum adsorption values (more than 95%) of Cr(VI) and As(V) by the MHAs were observed at pH 7.0. Considering that the PEI-h-BNNSs@Fe3O4 NPs possess the pHzpc value at 8.1, the MHAs possess the positive charge due to the pronated amino groups (R-NH3+) of the PEI chains and also pronated surface hydroxyl groups (Fe–OH2+) from Fe3O4 NPs at pH 7.0. Therefore, these protonated amino and hydroxyl residues enable the adsorbent of (MHAs) could electrostatically interact with negatively charged CrO42−, HCrO4, H2AsO4, and HAsO42− at pH 7.0. It is noted that the charge of chemical species Cr(VI) and As(V) gradually increased with raising their solution pH13,28,40,41,42,43. Besides, the surface of MHAs which contains abundant hydroxyl groups (given by PVA polymers), which are highly capable of forming hydrogen bonds with CrO42−, HCrO4, H2AsO4, and HAsO42− at pH 7.0. Taken collectively, the combination of hydrogen bonding and electrostatic attraction could maximize their adsorption of Cr(VI) and As(V) on the MHA surface at pH 7.0. Interestingly, at pH extremely low and high pH, the MHAs still offered >65% uptake of Cr(VI) and As(V) from an aqueous solution. This finding implies that the electrostatic attraction of MHAs with Cr(VI) and As(V) is the critical factor influencing their absorption capability. For example, at pH 9.0, strong electrostatic repulsion is expected to exist between the MHAs and HAsO42−. However, the MHAs adsorption of As(V) still kept approximately 96%. Therefore, we recommend that hydrogen bonding is the predominant driving force to trigger the MHAs to interact with Cr(VI) and As(V) in an aqueous solution. In support of the above-mentioned discussion, the adsorption isotherm experiments were conducted to determine their adsorption enthalpy of Cr(VI) and As(V) on the MHAs. The equilibrium adsorption capacity (qe) values of Cr(VI) and As(V) on the MHAs were gradually decreased with raising the incubation temperature at pH 7.0 and 9.0 (Supplementary Fig. 5a, b), reflecting that these adsorption process are exothermic. This phenomenon was suggested to be strong electrostatic repulsion between the MHAs and HAsO42− (or HCrO4) at pH 9.0. Furthermore, the enthalpy changes (ΔH0) was determined mechanism associated with binding type of MHAs to Cr(VI) and As(V). It is well documented that the London-van der Waals interaction energy is 4 to 8 kJ mol−1, while the strength of hydrogen bonds varies from 8 to 40 kJ mol−1.

By contrast, the enthalpy of chemisorption falls within the range of 40 to 400 kJ mol−1. From Supplementary Fig. 5c and Supplementary Table 2 show that the calculated ΔH0 values were determined in the range of −65 to −40 kJ mol−1 for the as developed adsorbent of MHA were mediated capturing of Cr(VI) and As(V) at pH 7.0 and 9.0. This finding are suggests that the strength of their interaction between MHAs and Cr(VI)/As(V) is close to that of hydrogen bonding, confirming that hydrogen bonding is a predominant factor for the interaction of MHAs with Cr(VI) and As(V).

$$HCrO_4^ - + 3Fe^{2 + } + 7H^ + \to Cr^{3 + } + 3Fe^{3 + } + 4H_2O$$
(1)
$$CrO_4^{2 - } + 3Fe^{2 + } + 8H^ + \to Cr^{3 + } + 3Fe^{3 + } + 4H_2O$$
(2)
$$H_2AsO_4^ - + 5Fe^{2 + } + 6H^ + \to As^0 + 5Fe^{3 + } + 4H_2O$$
(3)
$$HAsO_4^{2 - } + 5Fe^{2 + } + 7H^ + \to As^0 + 5Fe^{3 + } + 4H_2O$$
(4)
$$H_2AsO_4^ - + 2Fe^{2 + } + 3H^ + \to H_3AsO_3 + 2Fe^{3 + } + H_2O$$
(5)
$$HAsO_4^{2 - } + 2Fe^{2 + } + 4H^ + \to H_3AsO_3 + 2Fe^{3 + } + H_2O$$
(6)

$${{{\mathrm{q}}}}_{{{\mathrm{e}}}} = {{{\mathrm{K}}}}_F{{{\mathrm{C}}}}_{{{\mathrm{e}}}}^{{{{\mathrm{1/n}}}}}$$
(7)

where KF and n values are Freundlich constant and adsorption intensity, respectively. This result reflects that, their surface of the proposed aerogels exhibits different types of binding sites (i.e., heterogeneous surface) for multilayer adsorption of Cr (VI) and As(V). Moreover, the obtained n values of the proposed aerogels for capturing Cr(VI) and As(V) are larger than 1.0 (Supplementary Table 4), signifying their favorability of Cr(VI) and As(V) adsorption. We further determined their qmax values according to the following Halsey equation:

$${{{\mathrm{K}}}}_F = \frac{{{{{\mathrm{q}}}}_{{{{\mathrm{max}}}}}}}{{{{{\mathrm{C}}}}_0^{{{{\mathrm{1/n}}}}}}}$$
(8)

The qmax values of Cr(VI) and As(V) on the MHAs were respectively, 833 and 426 mg g−1, which are remarkably higher than the PEI-h-BNNSs-loaded PVA aerogels, Fe3O4 NPs-loaded PVA aerogels, and other reported adsorbents (Fig. 6e; Supplementary Tables 5 and 6).

### Adsorption of MB and AO by the MHAs

The thermodynamic studies were conducted to ascertain feasibility of the aerogels as an adsorbent for capturing of Cr(VI), As(V), MB and AO. The thermodynamic parameters of the standard Gibbs free energy (ΔG0), standard enthalpy (ΔH0) and standard entropy (ΔS0) were determined by the Gibbs–Helmholtz and Van’t Hoff equations as below:

$$\Delta G^0 = - R{{{\mathrm{T}}}}\;{{{\mathrm{ln}}}}K$$
(9)
$$\ln {{{\mathrm{K}}}} = \frac{{ - \Delta H^0}}{{R{{{\mathrm{T}}}}}} + \frac{{\Delta S^0}}{R}$$
(10)

## Methods

### Chemicals

Melamine was bought from Alfa-Aesar (Ward Hill, MD, USA). Boric acid, PEI (M.W., 750 kDa), polyvinyl alcohol (PVA; M.W., 130,000 kDa) were obtained from Sigma-Aldrich (St Louis, MO, USA). A standard solution of chromium (VI) and arsenic (V) was acquired from Merck (1000 mg L−1; Darmstadt, Germany) and then diluted to the desired concentration. MB, AO, FeCl2·4H2O, and FeCl3·6H2O were purchased from Showa Chemicals (Tokyo, Japan). All other reagents were procured from analytical grade. Milli-Q ultrapure water (Milli-Pore, Hamburg, Germany) was used in all the experiments.

### Synthesis of the PEI-h-BNNSs

5.0 g of boric acid and 3.5 g of melamine were dissolved in 300 mL of Milli-Q water. The as-obtained mixture was heated up to 85 °C for 5 h and then cooled down to ambient temperature. The resultant white precipitates were pyrolysis in a vertical tube furnace at 850 °C with a flow of N2 atmosphere (0.5 L min−1) for 10 h1,2,3,31. After cooling down to ambient temperature, the formed products (white buffy) were ground into fine particles with a pestle and mortar. Subsequently, 1.5 g of the resultant particles corresponding to the h-BN whiskers was dispersed in 150 mL of 5.0 M HCl. The obtained solution was treated with an ultrasonic probe sonication system (230 W; UP-100 Ultrasonic Processor, ChromTech, Taiwan) for 6 h, followed by centrifugation at 4500 rpm for 30 min. The exfoliated h-BNNSs in the supernatant were washed extensively with Milli-Q water until a neutral pH was reached18. The as-made h-BNNSs (45 mg mL−1, 100 mL) were functionalized with PEI (10 % w/v, 20 mL) in ultrasonic bath for 2 h32,43. The formed solid products (milky white) were washed thoroughly with Milli-Q water to eliminate their excess PEI molecules. After discarding the supernatant from the final wash, the resultant solid products corresponding to the PEI-h-BNNSs were dried and stored at room temperature without light and humidity prior to use in the synthesis of MHAs.

### Synthesis of the PEI-h-BN quantum dots

Briefly, the h-BN whiskers (0.25 g) was uniformly dispersed in DMF (250 mL), followed by ultra-sonication (Elmasoni E60H; Elma Schmidbauer GmbH, Singen, Germany) at 400 W and 4 °C for 24 h. Afterwards, the resultant solution was centrifuged at 4500 rpm for 30 min. The obtained supernatant was further boiled at 130 °C for 10 h under continuously stirring and then centrifuged at 12,000 rpm for 60 min. The nanoparticles in the second supernatant were denoted as the h-BN quantum dots71. The procedure associated with the PEI-mediated modification of h-BN quantum dots was the same as that used in the preparation of the PEI-h-BNNSs32,43.

### Preparation of aerogels

(a) PEI-h-BNNSs-loaded PVA aerogels. A known quantities of PEI-h-BNNSs (0.5−1.0 g) were mixed with 3 mL of 3.0% w/w PVA aqueous solution. The resultant mixture was stirred at 80 °C for 30 min; the final concentrations of PEI-h-BNNSs ranged from 10.0 to 40.0 mg mL−1. The suspension of PVA-modified PEI-h-BNNSs was filled in a rubber mold and further cooled at −70 °C by liquid nitrogen31. After 2 h, the frozen products were lyophilized by freeze-dryer (FD-5030, PanChum Sci. Corp, Taiwan) for 48 h (−57.2 °C and 5.9 Pa) to remove the excess surface moisture. The obtained aerogels were stored in a dry and sealed container at 25 °C. (b) MHAs. 0.5 g of PEI-h-BNNSs in Milli-Q water (100 mL) was dispersed by ultra-sonication for 20 min. The dispersed PEI-h-BNNSs were mixed with a solution (100 mL) containing 1.4 g of FeCl2·4H2O and 3.6 g of FeCl3·6H2O under gentle stirring. The mixture was bubbled with nitrogen gas for 30 min, followed by heating to 80 °C for 30 min. Subsequently, 10 mL of 5.0 M NH4OH was injected rapidly into the heating solution, which was left to stir for another 60 min. After cooling down to ambient temperature, the obtained black-colored solution was washed thoroughly with Milli-Q water42. The as-prepared PEI-h-BNNSs@Fe3O4 NPs (30 mg mL−1, 80 mL) were blended with 3 mL, 3.0% w/w of PVA for 60 min, followed by injecting 2 mL of 4.0 M H2SO4. The obtained mixture was kept in an autoclave at 180−200 °C for 24 h31,47, cooled down to ambient temperature, washed thoroughly with Milli-Q water and then treated by a freeze dryer (−57.2 °C and 5.9 Pa) for 48 h. The resultant MHAs were stored in a dry environment at 25 °C. (c) Fe3O4 NPs-loaded PVA aerogels. The synthesis of bare Fe3O4 NPs followed by previously reported methods28,40,42, and their detailed procedures were discussed in the Supporting Information. The as-prepared Fe3O4 NPs (25 mg mL−1, 80 mL) were mixed with 3.0 mL of 3.0% w/w, PVA for 60 min. After introducing 2 mL of 4.0 M H2SO4 to the resultant mixture of solution was treated at 180−200 °C for 24 h. The obtained products were washed extensively with Milli-Q water, subsequently treated by a freeze dryer and then stored at 25 °C47.

### Mass concentration of nanomaterials

Aqueous solutions of different nanomaterials were passed through cellulose acetate syringe filters (0.22 µm), oven-dried at 80 °C, and then stored at 50% relative humidity at 25 oC for 48 h. The masses of unloaded and nanomaterial-loaded syringe filters were weighed on an electronic microbalance (MSA6.6S-0CE-DM, Sartorius, Goettingen, Germany) with the readability of 10−6 g. In sequence, the mass concentrations of PEI-h-BNNSs@Fe3O4 NPs, PEI-h-BNNSs, and Fe3O4 NPs were determined to be 41.3, 16.9, and 27.6 mg mL−1.

The adsorption behavior and mechanism of PEI-h-BNNSs-loaded PVA aerogels, Fe3O4 NPs-loaded PVA aerogels and MHAs were studied by various isothermal models and kinetics at 303 K. To establish the adsorption isotherm curves, we incubated the fixed amount of aerogels (2.0 g) with 10−600 mg mL−1 of Cr(VI) at pH 4.3−7.0 and 10−600 mg mL−1 of As(V) at pH 4.3−7.0 for 15 min. The aerogels in the resultant solutions were collected by magnetic separation or centrifugation. Subsequently, the concentration of Cr(VI) or As(V) in the supernatant was determined by inductively coupled plasma mass spectrometry (ICP-MS; PerkinElmer, Sciex-Elan DRC Plus; software used: Elan-6100 DRC PLUS). The collected aerogels were washed with a mild base solution [(10 mL; 0.1 M of KOH, NaOH and NH4OH)] and then used in the next adsorption cycle. Moreover, the adsorption isotherms of MB and AO were treated by the as made aerogel by varying their initial concentration C0 values obtained from 10 to 500 mg mL−1 at pH 8.5 and 4.5, respectively. After centrifugation or magnetic separation, the concentration of MB or AO in the supernatant was measured on a UV–Vis spectrometer (V-630, Jasco, Tokyo, Japan). The MB- and AO-adsorbed aerogels were rinsed with a strong acid [(10 mL; 0.1 M of HCl, HNO3, and H2SO4)] and a strong base [(10 mL; 0.1 M of KOH, NaOH, and NH4OH)], respectively. The procedure mentioned above was repeated to test their reusability of the adsorbents.

The kinetic studies were carried out by contacting different kinds of aerogels with 100 mg mL−1 of Cr(VI), 100 mg mL−1 of As(V), 50 mg mL−1 of MB, and 50 mg mL−1 of AO at pH 7.0, 7.0, 8.5 and 4,5, respectively21,24,25,26,28,40,42,43. After 0−20 min, the resultant aerogels were collected by magnetic separation. The final concentrations (Ce) of free Cr(VI), As(V), MB and AO in the supernatant were measured by ICP-MS or UV-visible absorption spectrometer. It is noted that the maximum absorption wavelengths of MB and AO were 660 and 490 nm, respectively23,24,25,64. The amounts of Cr(VI), As(V), MB and AO on the aerogels at equilibrium, qe (mg g−1), were calculated by the following equation:

$${{{\mathrm{q}}}}_e{{{\mathrm{ = }}}}\frac{{\left( {{{{\mathrm{C}}}}_0 - {{{\mathrm{C}}}}_e} \right)V}}{W}$$
(11)

where Ce is the liquid-phase concentration of the aerogels at equilibrium, W is the weight (g) of the dry aerogels and V is the volume (L) of the tested solution. The removal efficacy (% RE) was determined according to the equation given below:

$${{{\mathrm{\% }}}}\;{{{\mathrm{RE = }}}}\frac{{({{{\mathrm{C}}}}_0 - {{{\mathrm{C}}}}_f)}}{{{{{\mathrm{C}}}}_0}}{{{\mathrm{ \times 100}}}}$$
(12)

### MHA-mediated detoxification of Cr(VI) and As(V) in real-world samples

Industrial soil-sludge samples were collected from Erren River in Tainan, Art Museum in Kaohsiung, and Love River in Kaohsiung). The collected samples (5.0 g) was introduced into a 100 mL PTFE digestion vessel, followed by mixing with a digest solution (5.0 m of concentrated HNO3 and 4 mL of concentrated HF). The resultant vessel was reacted at 210 oC and 800 W for 40 min, remained at 160 oC for 20 min, cooled to room temperature and then diluted with 10 mL of Milli-Q water. The resultant solution was treated with and without the proposed MHAs (2.0 g) under gentle shaking at pH 7.0. The concentration of total chromium and arsenic in the obtained solution was determined by ICP-MS.

### Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.