N-Doped Carbon Aerogels Obtained from APMP Fiber Aerogels Saturated with Rhodamine Dye and Their Application as Supercapacitor Electrodes

: We developed an efﬁcient and environmentally friendly strategy for synthesizing an N-doped carbon aerogel by the carbonization of an alkaline peroxide mechanical pulp (APMP) ﬁber aerogel saturated with rhodamine B (RB) dyes. The APMP aerogel was prepared via cellulose extraction, sol-gel, and freeze drying. The resulting aerogel had a high adsorption capacity (250 mg g − 1 ) and a fast adsorption rate (within 30 s) towards RB dyes. The saturated aerogel was used as a starting material for further carbonization to prepare N-doped carbon aerogels. SEM studies showed that the 3D network structure of the APMP aerogels was well preserved after RB adsorption and carbonization. The prepared carbon aerogel exhibited a graphitized structure, and N (2.15%) was doped at pyridinic N and pyrrolic N sites in the 3D carbon network. The speciﬁc capacitance of the N-doped carbon aerogel reached 185 F g − 1 at a current density of 1 A g − 1 , which is higher than carbon aerogels (155 F g − 1 ).


Introduction
Owing to the global energy crisis, the demand for higher energy and power storage equipment is increasing [1][2][3]. Supercapacitors, an electrochemical capacitor, have a long cycle life, high-power density, high charge/discharge rate and good safety [4]. These devices show great potential for efficient energy storage [5] and for use in electric vehicles, batteries, and wind power. According to the charge storage mechanism of the electrode, supercapacitors can be classified as either electric double-layer capacitors (EDLCs) or pseudocapacitors. EDLCs exhibit a non-faradic reaction as charges accumulate at the electrolyte interface and electrode, whereas pseudocapacitors show faradic redox reactions [6,7]. The electrode is one of the most important parts of a supercapacitor, and it is important for an ideal electrode material to have a suitable porous structure and an ion-contactable specific surface area [8]. Furthermore, there is also a trend towards using renewable biomass for electrodes [9,10]. In particular, recent findings have revealed that the engineering of carbon materials by doping nitrogen (N) is an efficient method of improving specific capacitance performance because the nitrogen-containing functional group can undergo a Faraday reaction and improve the wettability of the pore walls, and nitrogen doping could increase the conductivity of carbon material [11][12][13][14].
There are two main methods for synthesizing nitrogen-doped carbon materials, in-situ doping and post-treatment. In-situ doping approaches include chemical vapor deposition, arc-discharge methods, and the treatment of porous carbon materials with nitrogenous compounds, for example, amines [15], ammonia [16], bone char [17], or polymelamine [18]. Post-treatments include carbonization with Appl. Sci. 2019, 9, 618; doi:10.3390/app9040618 www.mdpi.com/journal/applsci nitrogen-rich compounds [17,19] and in a nitrogen-donor atmosphere [20]. However, the expensive and complex instruments and toxic precursors may limit their practical application. Thus, the selection of appropriate N sources, the development of environmentally friendly and simple methods to prepare nitrogen-doped carbon aerogels are highly desirable but challenging targets. Aerogels are solid materials obtained by replacing a liquid or gel phase with a gas while leaving the solid network of the gel intact [21][22][23][24][25]. As a family of 3D network porous materials, aerogels can be produced from biomass such as cotton [26][27][28], bagasse [29], bamboo [30], and bacterial cellulose [31]. Due to their large porosity, low density, high specific surface area, and wettability [32], aerogels have been extensively used in gas sensors [33], catalyst supports [34], and adsorbents [35]. Carbon aerogels, obtained by aerogel carbonization, exhibit both the high specific surface area and porosity of aerogels and the electrical conductivity and high chemical stability of the carbon materials, making them an ideal electrode material for supercapacitors [36][37][38][39]. However, the electrochemical performance of unmodified carbon aerogels has been unsatisfactory to date [40]. Rhodamine B (RB), a toxic dye, is extensively used in daily life and industrial manufacture and represents a serious and difficult-to-remedy environmental threat. The chemical structure of RB organic dyes contains a large number of nitrogen atoms [41], making RB a suitable candidate precursor for preparing N-doped carbon materials. Furthermore, taking full advantage of N-rich waste based on RB organic dyes will enable effective resource recycling.
In previous papers, cellulose-based aerogels have been shown to absorb a range of organic dyes because they have good wettability and many functional groups on their surface [42]. We removed RB using an alkaline peroxide mechanical pulp (APMP) fiber aerogel as the sorbent and used the aerogel saturated with RB dye to obtained N-doped carbon aerogels for supercapacitors. Herein, RB adsorbed onto the APMP aerogel was used as a nitrogen source, and N-doped carbon aerogels were successfully obtained after carbonization of the aerogels saturated with RB dye. We also investigated their electrochemical properties as electrodes of supercapacitors.

Materials
The alkaline peroxide mechanical pulp (APMP) used was from Mudanjiang Hengfeng Paper Co. Ltd., Mudanjiang, China. Rhodamine B and sodium chlorite were obtained from Kermel LLC (Tianjin, China). Glacial acetic acid, sodium hydroxide, and urea were all obtained from Guangfu LLC (Tianjin, China).

Preparation of APMP Fiber Aerogel
The purification of APMP fiber from APMP waste was conducted by alkaline hydrolysis according to reported methods [34]. The dried APMP powder was treated with a sodium chlorite and glacial acetic acid mixture to remove hemicellulose and lignin. The mixture was maintained in a 4% sodium hydroxide solution at 80 • C for 4 h to remove residual hemicellulose and lignin. The APMP fibers were washed repeatedly with deionized water until neutral. A 2 g portion of the prepared APMP fibers was dispersed into a precooled NaOH/urea/H 2 O (8:12:81 w/w) solvent system and stirred vigorously for 6 h to form a cellulose suspension (4 • C). The cellulose suspension was kept for 15 h to form a cellulose hydrogel (50 • C). The hydrogel was regenerated in water and washed with deionized water until neutral, then freeze-dried for 50 h to obtain the APMP fiber aerogels.

Adsorption Performance of APMP Aerogels
A 0.1 g sample of APMP aerogel was soaked in RB solution (5 mL, 5 g L −1 ) until saturation sorption at ambient temperature (25 • C). The sample was immediately transferred to a vacuum drying oven for 6 h to remove water at a temperature of 40 • C, which is much lower than the melting point of RB (210-211 • C) and leaves the molecules on the aerogel structure.
The absorption capacity of aerogels for RB was calculated as follows: q e = (C 0 V 0 − C 1 V 1 )/m, where q e (mg g −1 ) is the absorption capacity for dye at equilibrium; m (g) is the weight of the adsorbent used; C 0 and C 1 (mg L −1 ) are the initial and residual concentrations, respectively; V 0 and V 1 (L) are the initial and residual volumes of the dye solution, respectively, because the aerogels not only absorbed the RB but also absorbed moisture.

Preparation of N-Doped Carbon Aerogels
The RB-saturated aerogels were carbonized into a tubular furnace (using Ar atmosphere as a protective gas to provide an oxygen-free environment), which was heated to 500 • C (2 • C min −1 ), kept at 500 • C (1 h) to removed impurities, then heated to 900 • C at a rate of 5 • C min −1 to prevent structure damage due to the rapid heating rate and kept for 2 h to ensure complete carbonization before cooling to room temperature naturally.

Electrochemical Measurements
Electrochemical measurements were performed using an electrochemical analyzer (Ivium 1470E, England) with a conventional three-electrode system. The electrode was prepared from a carbon aerogel (80 %), polytetrafluoroethylene (PTFE) binder (10 %), and acetylene black (10 %) in ethanol, coated onto a 1 × 1 cm 2 nickel foam and dried at 120 • C (12 h). In a 6 M KOH electrolyte, modified nickel foam, a Hg/HgO electrode, and platinum gauze were used as the working, reference, and counter electrodes, respectively. The cyclic voltammetry (CV) curves were tested in a potential range of −1.0 to 0 V (5 to 400 mV s −1 ). Galvanostatic charge/discharge (GCD) analysis was obtained in a potential window of −1.0 to 0 V (1 to 10 A g −1 ). The electrochemical impedance spectroscopy (EIS) measurements were conducted in the frequency range of 0.01 Hz-100 kHz. The specific capacitance (C) was calculated as follows: where C (F g −1 ) is the specific capacitance calculated from the GCD and CV tests; I is the current load (A); ∆t (s) is the discharge time; ∆V (V) is the potential window; m (mg) is the mass of the active materials; v is the scan rate (mV s −1 ).

RB Sorption Capacity of APMP Aerogels
As shown in Figure 1, the APMP aerogels were effective for RB waste dye adsorption owing to their porosity and wettability [24]. The RB dye containing water was absorbed within a few seconds when in contact with a piece of aerogel at ambient temperature. Our RB absorption testing showed that 0.1 g of the APMP fiber aerogels could absorb 5 mL of high concentration RB waste (5 g L −1 ), which reflects the excellent absorption of RB waste (250 mg g −1 ). As shown in Table 1, the dye adsorption capacity is higher than many materials such as MoS 2 , jute stick powder, and kaolinite; however, it is lower than that of some types of activated carbon. Nevertheless, the adsorption rate of our aerogel is particularly fast, which indicates that APMP fiber aerogels are an excellent candidate for dealing with RB waste pollution.

SEM Observations and Porous Analysis
The morphologies of the APMP, carbon, and N-doped carbon aerogels were performed by SEM. As displayed in Figure 2a, most of the irregular fibers of the APMP aerogel were intertwined to form a porous structure with many irregular pores ranging from approximately dozens of nanometers to several micrometers. After carbonization, the carbon aerogel showed a network structure with more irregular pores (Figure 2b). The N-doped carbon aerogel also exhibited network structure, and its irregular pores were well preserved ( Figure 2c); however, the pore structure showed a slight collapse

SEM Observations and Porous Analysis
The morphologies of the APMP, carbon, and N-doped carbon aerogels were performed by SEM. As displayed in Figure 2a, most of the irregular fibers of the APMP aerogel were intertwined to form a porous structure with many irregular pores ranging from approximately dozens of nanometers to several micrometers. After carbonization, the carbon aerogel showed a network structure with more irregular pores (Figure 2b). The N-doped carbon aerogel also exhibited network structure, and its irregular pores were well preserved ( Figure 2c); however, the pore structure showed a slight collapse and stacking of fibers onto each other because the fibers became soft when the APMP fiber aerogel absorbed RB dye, resulting in some structural collapse after drying. The result can be further explained by nitrogen absorption test (Figure 2d,e). The specific surface area and total pore volume of the carbon aerogel were 52 m 2 g −1 and 0.04 cm 3 g −1 , respectively, which is higher than the N-doped carbon aerogel (30 m 2 g −1 and 0.02 cm 3 g −1 , respectively). and stacking of fibers onto each other because the fibers became soft when the APMP fiber aerogel absorbed RB dye, resulting in some structural collapse after drying. The result can be further explained by nitrogen absorption test (Figure 2d,e). The specific surface area and total pore volume of the carbon aerogel were 52 m 2 g −1 and 0.04 cm 3 g −1 , respectively, which is higher than the N-doped carbon aerogel (30 m 2 g −1 and 0.02 cm 3 g −1 , respectively).

X-Ray Photoelectron Spectroscopy (XPS) Analysis
The chemical structures of RB contain heteroatom N compounds, making them excellent precursors for preparing doped heteroatom carbon aerogels. To demonstrate that the heteroatom N was bound to the structure and not combusted during high-temperature carbonation, we confirmed the compositions of the carbon and N-doped carbon aerogels by XPS analysis. The C 1s peak (284.3 eV) and O 1s peak (532.2 eV) were clearly visible in the spectra (Figure 3a). The atomic percentage of C was 86.82 at.% and that of O was 13.18 at.%. The N-doped carbon aerogel showed three peaks assignable to C 1s (284.4 eV), N 1s (400.7 eV), and O 1s (532.2 eV). The atomic percentages of C, N, and O in the N-doped carbon aerogel were 86.92 at.%, 2.15 at.%, and 10.93 at.%, respectively. Thus, N was successfully doped into the carbon aerogel skeleton. Furthermore, as shown in the fitted N 1s spectra of the N-doped carbon aerogel (Figure 3b), the N 1s spectrum was fitted by three peaks, namely pyridinic N (398 ± 0.2 eV), graphitic N (401.2 ± 0.2 eV), and pyrrolic N (400.5 ± 0.2 eV), while pyridinic N and pyrrolic N were considered as the main contributors to the pseudocapacitance, based on the Faraday reaction and according to previous reports [52]. For example, pyridinic N and pyrrolic N could produce pseudocapacitive effects in KOH aqueous electrolyte, associated with the protoninvolved redox processes, as shown in Figure 3c. Thus, the porous N-doped carbon aerogels are expected to have good electrochemical properties. Furthermore, doping heteroatom nitrogen is a promising strategy to further tailor the chemical properties of sp 2 carbon materials, which can efficiently improve the wettability of the interface between the electrodes and electrolytes, resulting in a considerable increase in the accessible surface area of the electrolyte. In addition, the presence of N can also promote electron transfer reactions and consequently enhance the whole capacitive performance of the supercapacitors [53].

X-ray Photoelectron Spectroscopy (XPS) Analysis
The chemical structures of RB contain heteroatom N compounds, making them excellent precursors for preparing doped heteroatom carbon aerogels. To demonstrate that the heteroatom N was bound to the structure and not combusted during high-temperature carbonation, we confirmed the compositions of the carbon and N-doped carbon aerogels by XPS analysis. The C 1s peak (284.3 eV) and O 1s peak (532.2 eV) were clearly visible in the spectra (Figure 3a). The atomic percentage of C was 86.82 at.% and that of O was 13.18 at.%. The N-doped carbon aerogel showed three peaks assignable to C 1s (284.4 eV), N 1s (400.7 eV), and O 1s (532.2 eV). The atomic percentages of C, N, and O in the N-doped carbon aerogel were 86.92 at.%, 2.15 at.%, and 10.93 at.%, respectively. Thus, N was successfully doped into the carbon aerogel skeleton. Furthermore, as shown in the fitted N 1s spectra of the N-doped carbon aerogel (Figure 3b), the N 1s spectrum was fitted by three peaks, namely pyridinic N (398 ± 0.2 eV), graphitic N (401.2 ± 0.2 eV), and pyrrolic N (400.5 ± 0.2 eV), while pyridinic N and pyrrolic N were considered as the main contributors to the pseudocapacitance, based on the Faraday reaction and according to previous reports [52]. For example, pyridinic N and pyrrolic N could produce pseudocapacitive effects in KOH aqueous electrolyte, associated with the proton-involved redox processes, as shown in Figure 3c. Thus, the porous N-doped carbon aerogels are expected to have good electrochemical properties. Furthermore, doping heteroatom nitrogen is a promising strategy to further tailor the chemical properties of sp 2 carbon materials, which can efficiently improve the wettability of the interface between the electrodes and electrolytes, resulting in a considerable increase in the accessible surface area of the electrolyte. In addition, the presence of N can also promote electron transfer reactions and consequently enhance the whole capacitive performance of the supercapacitors [53].

XRD and Raman Analysis
XRD curves of the prepared samples are displayed in Figure 4a. The diffractograms of the materials showed two broad peaks at approximately 22.6° (002) and 43.6° (100). The peaks at 22.6° and 43.6° correspond to an amorphous carbon portion and graphitic carbon, respectively. We observed a decrease in the intensity of the peaks related to the N-doped carbon aerogel, which might correspond to the entry of heteroatoms into the graphite carbon lattice. We investigated the graphitic structures of the carbon aerogel and N-doped carbon aerogel by Raman spectroscopy. In their Raman spectra, both exhibited two peaks at 1337.5 cm −1 (D band) and 1594.5 cm −1 (G band). The D band is related to structural defects of disordered carbon, whereas the G band is associated with the ordered carbon vibration [3,48]. The ratio of ID/IG could appraise the graphitic structure of synthesized materials, and the calculated values were 0.94 and 0.98 for the carbon aerogel and N-doped carbon aerogel, respectively, indicating a high degree of graphitization in both samples, in agreement with the XRD results. Graphitization of carbon materials increases their electric conductivity and decreases the equivalent series resistance of supercapacitors; thus, these features will likely affect the impedance behavior [53].

Electrochemical Performance
The electrochemical properties of the carbon aerogel and N-doped carbon aerogel were tested in a 6 M KOH aqueous electrolyte at room temperature. Figure 5a compares the CV curves of the carbon aerogel and N-doped carbon aerogel (10 mV s −1 ). Both samples exhibited approximately rectangular curves, suggesting that the supercapacitors possessed a super capacitive behavior and good reversibility. In addition, N-doped carbon aerogel electrodes showed higher current densities than those of the carbon aerogel sample, indicating that the N-doped carbon aerogel had high

XRD and Raman Analysis
XRD curves of the prepared samples are displayed in Figure 4a. The diffractograms of the materials showed two broad peaks at approximately 22.6 • (002) and 43.6 • (100). The peaks at 22.6 • and 43.6 • correspond to an amorphous carbon portion and graphitic carbon, respectively. We observed a decrease in the intensity of the peaks related to the N-doped carbon aerogel, which might correspond to the entry of heteroatoms into the graphite carbon lattice. We investigated the graphitic structures of the carbon aerogel and N-doped carbon aerogel by Raman spectroscopy. In their Raman spectra, both exhibited two peaks at 1337.5 cm −1 (D band) and 1594.5 cm −1 (G band). The D band is related to structural defects of disordered carbon, whereas the G band is associated with the ordered carbon vibration [3,48]. The ratio of I D /I G could appraise the graphitic structure of synthesized materials, and the calculated values were 0.94 and 0.98 for the carbon aerogel and N-doped carbon aerogel, respectively, indicating a high degree of graphitization in both samples, in agreement with the XRD results. Graphitization of carbon materials increases their electric conductivity and decreases the equivalent series resistance of supercapacitors; thus, these features will likely affect the impedance behavior [53].

XRD and Raman Analysis
XRD curves of the prepared samples are displayed in Figure 4a. The diffractograms of the materials showed two broad peaks at approximately 22.6° (002) and 43.6° (100). The peaks at 22.6° and 43.6° correspond to an amorphous carbon portion and graphitic carbon, respectively. We observed a decrease in the intensity of the peaks related to the N-doped carbon aerogel, which might correspond to the entry of heteroatoms into the graphite carbon lattice. We investigated the graphitic structures of the carbon aerogel and N-doped carbon aerogel by Raman spectroscopy. In their Raman spectra, both exhibited two peaks at 1337.5 cm −1 (D band) and 1594.5 cm −1 (G band). The D band is related to structural defects of disordered carbon, whereas the G band is associated with the ordered carbon vibration [3,48]. The ratio of ID/IG could appraise the graphitic structure of synthesized materials, and the calculated values were 0.94 and 0.98 for the carbon aerogel and N-doped carbon aerogel, respectively, indicating a high degree of graphitization in both samples, in agreement with the XRD results. Graphitization of carbon materials increases their electric conductivity and decreases the equivalent series resistance of supercapacitors; thus, these features will likely affect the impedance behavior [53].

Electrochemical Performance
The electrochemical properties of the carbon aerogel and N-doped carbon aerogel were tested in a 6 M KOH aqueous electrolyte at room temperature. Figure 5a compares the CV curves of the carbon aerogel and N-doped carbon aerogel (10 mV s −1 ). Both samples exhibited approximately rectangular curves, suggesting that the supercapacitors possessed a super capacitive behavior and good reversibility. In addition, N-doped carbon aerogel electrodes showed higher current densities than those of the carbon aerogel sample, indicating that the N-doped carbon aerogel had high

Electrochemical Performance
The electrochemical properties of the carbon aerogel and N-doped carbon aerogel were tested in a 6 M KOH aqueous electrolyte at room temperature. Figure 5a compares the CV curves of the carbon aerogel and N-doped carbon aerogel (10 mV s −1 ). Both samples exhibited approximately rectangular curves, suggesting that the supercapacitors possessed a super capacitive behavior and good reversibility. In addition, N-doped carbon aerogel electrodes showed higher current densities than those of the carbon aerogel sample, indicating that the N-doped carbon aerogel had high capacitances. The result can be further explained by C CV values at 10 mV s −1 . The C CV for the N-doped carbon aerogel and carbon aerogel were 120 F g −1 and 104 F g −1 , respectively. Figure 5b shows the CV curves of the N-doped carbon aerogel aqueous electrolyte capacitors at scan rates from 5 to 400 mV s −1 . The current response increased as the scan rate increased, and the shapes of the CV curves were retained, indicating that N-doped carbon aerogel exhibited an ideal electrical double layer. Hence, the electrodes exhibited supercapacitor electrode behavior and a good rate capability. Comparing the carbon aerogel and N-doped carbon aerogel, it can be observed that the specific surface area and total pore volume decrease a little but that the electrochemical performance capacitance increases. Therefore, doping heteroatom nitrogen is a promising strategy to further tailor the chemical properties of sp 2 carbon materials and can efficiently improve the wettability of the interface between electrodes and electrolytes, resulting in a considerable increase in the accessible surface area of the electrolyte, promoting electron transfer reactions and consequently enhancing the whole capacitive performance of the supercapacitors. Thus, we attribute the high capacitive performance of our N-doped carbon aerogel electrodes to the 3D network structure with N-doping.
The galvanostatic charge/discharge performances of the prepared sample electrodes at 1 A g −1 were tested (Figure 5c). The N-doped carbon aerogels had a better capacitance performance owing to their greater charge/discharge time and more symmetrical curves. We attribute these features to the porous structure of nitrogen-doped aerogels, resulting in the kinetics of ion and electron transport being increased at the electrode/electrolyte interface. As shown in Figure 5d, the galvanostatic charge/discharge performance of the N-doped carbon aerogel electrode (1 to 10 A g −1 ) was also tested. Obviously, as the current density increased, the charge/discharge time decreased. This can be attributed to the shorter time for electrolyte ions to diffuse into the pores of the electrodes. Furthermore, at different current densities, the charge/discharge curves of the N-doped carbon aerogel also exhibited an equicrural triangle shape, suggesting ideal capacitor behavior (Figure 5c). Figure 5e exhibits the specific capacitances of the carbon aerogel and N-doped carbon aerogel calculated from the galvanostatic discharge data. At the same current density from 1 to 10 A g −1 , the N-doped carbon aerogel showed a higher specific capacitance. For example, the N-doped carbon aerogel possessed a specific capacitance of 185.8 F g −1 at 1 A g −1 , which was higher than the values for the carbon aerogel (155 F g −1 at 1 A g −1 ), and the specific capacitance of the N-doped carbon aerogel at 10 A g −1 remained 105 F g −1 , while the carbon aerogel only showed capacities of 84 F g −1 , suggesting the beneficial effects of the N heteroatoms doped into the carbon aerogels. Moreover, a specific capacitance of 105 F g −1 was maintained for the N-doped carbon aerogel at 10 A g −1 , which demonstrates good performance stability. Furthermore, the specific capacitance of the N-doped carbon aerogel was higher than other N-doped carbon materials, such as heteroatom-doped carbon nanofiber aerogels (171.2 F g −1 , 0.5 A g −1 ) [60], sulfur and nitrogen dual-doping carbon materials (170 F g −1 , 1 A g −1 ) [61], and KOH-activated carbon aerogels (152.6 F g −1 , 0.5 A g −1 ) [62]. Figure 5f shows the electrochemical impedance analysis of the carbon aerogel and N-doped carbon aerogel at an open circuit potential (0.01 Hz to 100 kHz). The low-frequency region of the Nyquist spectrum of the N-doped carbon aerogel was much closer to vertical lines, which confirms the dominance of the electric double-layer capacitor as well as the good capacitive performance. In addition, the length of the Warburg-type lines (the 45 • segment) was short, which indicates low resistance and high ion diffusion efficiency for ion transport. At high frequency, the appearance of the semicircle indicates that the N-doped carbon aerogel has a very low charge transfer resistance and ion diffusion resistance. The equivalent series resistance obtained from the first intersection with the real axis is only 0.5 Ω, further confirming a high charge transfer rate between the electrolyte and active materials.

Conclusions
We have successfully reported an efficient and simple strategy for preparing N-doped carbon aerogels by the carbonization of APMP aerogels saturated with rhodamine dye. The APMP fiber aerogel exhibited a high adsorption capacity and 0.1 g of aerogel could easily absorb 5 mL of highly concentrated RB waste (5 g L −1 ) within 30 s. In addition, N heteroatoms were successfully doped into the 3D network structure after carbonization, and the specific capacitance of N-doped carbon aerogel reached 185 F g −1 (1 A g −1 current density). This method not only addresses the problem of dye wastewater but also turns the waste into useful materials, providing an environmentally friendly and low-cost strategy for fabricating N-doped carbon aerogels. Other organic dyes such as methyl orange, methylene blue, or crystal violet could be also be used to prepared N-doped carbon materials in the same way.

Conclusions
We have successfully reported an efficient and simple strategy for preparing N-doped carbon aerogels by the carbonization of APMP aerogels saturated with rhodamine dye. The APMP fiber aerogel exhibited a high adsorption capacity and 0.1 g of aerogel could easily absorb 5 mL of highly concentrated RB waste (5 g L −1 ) within 30 s. In addition, N heteroatoms were successfully doped into the 3D network structure after carbonization, and the specific capacitance of N-doped carbon aerogel reached 185 F g −1 (1 A g −1 current density). This method not only addresses the problem of dye wastewater but also turns the waste into useful materials, providing an environmentally friendly and low-cost strategy for fabricating N-doped carbon aerogels. Other organic dyes such as methyl orange, methylene blue, or crystal violet could be also be used to prepared N-doped carbon materials in the same way.