1 Introduction

Supercapacitors have been considered as a promising energy conversion technology because of their high power density, fast charge–discharge rate, and long-term durability [1, 2]. Among different electrodes, carbon material possessing high specific surface area, porous structure, and high physicochemical stability is a promising candidate for supercapacitors [3, 4]. To obtain high-performance carbon electrodes, great efforts have been made to regulate the specific surface area, porous architecture, and heteroatom doping.

It has been widely reported that increasing the specific surface area can effectively enhance the supercapacitance performances [5]. Additionally, hierarchical porous structure with rational micropore/mesopore ratio also plays an important role in enhancing the supercapacitance performances of carbon electrodes, since abundant micropores can increase the accessible surface area for charge storage, while connected mesopores are beneficial for shortening ion transport distance and allowing high rate capability [6, 7]. Furthermore, doping heteroatoms into the carbon matrix is regarded as the most promising and versatile way to boost the electrochemical performances. For instance, nitrogen (N) doping can enhance the wettability, electrical conductivity, structural quality, electrochemical active sites of carbon electrode and provide pseudo-capacitance [8, 9]. Sulfur (S) doping is supposed to improve electrical conductivity and specific capacitance owing to the formation of an extended p-system with a filled valence band and the enhanced polarization [10, 11].

In addition to regulating the physicochemical properties, fabricating carbon materials in a sustainable and environmentally friendly way is quite imperative when considering the depletion of fossil resources and environmental problems. Biomass, as the most abundant renewable carbon source, has attracted increasing interest for energy application. Up to now, carbon materials for energy storage have been widely obtained from biomass resources, such as cellulose [12, 13], chitosan [14], glucose [15], straw [16], corn [17], and collagen-enriched biomass [18, 19]. For example, a multi-heteroatom doped porous carbon was efficiently prepared via a controllable pyrolysis of fish scale with KOH [19]. The obtained carbon possessed ultrathin nanosheet structure, micropore-dominate porosity and rich surface heteroatoms, which endowed the electrode with a high capacitance of 306 F g−1 at the current density of 1 A g−1. Though many high-performance biomass-based carbon materials have been successfully fabricated, the synthetic strategies usually involve traditional activation or template processes. Traditional activation may introduce small micropores, consume large amounts of chemical agents, and even corrode equipment, while template method is complicated and high-cost [20, 21]. Thus, more sustainable and cost-effective approaches should be considered when fabricating biomass-derived carbon materials.

Lignin, as the third most abundant renewable resource, accounts for 20–30% in plants and has a high carbon content (45–60 wt%) [22]. About 70 million tons of lignin is generated annually as a residual product of paper-making industries, but only ~ 5% is utilized for value-added applications [23]. Thus, using lignin as a precursor for synthesizing advanced carbon materials can provide economic and environmental benefits. Particularly, lignosulfonate, a derivative of lignin produced from sulfite pulping or sulfonation of lignin, contains abundant functional groups (e.g., sulfonate and phenolic hydroxyl groups), which makes it soluble in water and easily coordinate with other components, allowing for structural adjustments [24, 25]. Furthermore, the sulfonate group is an intrinsic S source for S self-doping in the carbon framework [26].

Herein, we propose an economic and simple strategy to synthesize a carbon material (Fe-SN6C@900) with dual heteroatoms (N and S) doping from lignosulfonate without activation or template process. The coordination between Fe ions and lignosulfonate via hydrothermal treatment results in Fe–lignosulfonate (Fe–LS) complex with spherical shape, while the high-temperature carbonization with melamine produces abundant graphitized nanosheets. The resultant carbon Fe-SN6C@900 displays large specific surface area and rational pore structure, which are favorable for electron transport, ion storage and improving electrical conductivity. The high contents of doping N (8.47 wt%) and S (2.56 wt%) can improve the surface wettability, afford additional pseudo-capacitance, and finally boost the electrochemical performances. Thus, Fe-SN6C@900 reveals excellent supercapacitance performances with high specific capacitance of 390 F g−1, superior cycling stability, and high energy density of 14.7 W h kg−1.

2 Materials and methods

2.1 Materials

Lignosulphonate (LS) was purchased from Shanghai Aladdin Industrial Corporation (China). Ferric chloride hexahydrate (FeCl3·6H2O), copper chloride dihydrate (CuCl2·2H2O), melamine, ammonium chloride (NH4Cl), urea, sulfuric acid (H2SO4), and sodium sulfate (Na2SO4) were analytical grade and used without purification.

2.2 Preparation of Fe–Lignosulphonate (Fe–LS)

1.67 g FeCl3·6H2O was dissolved in 10 mL water and stirred for 20 min. 1.00 g LS was added into the FeCl3 solution with stirring for 1 h. The mixture was transferred into a Teflon autoclave reactor for hydrothermal treatment at 180 °C for 4 h. After hydrothermal treatment, the obtained product was thoroughly washed with water and recovered by filtration. The dried product was denoted as FeLS. Control sample without the addition of FeCl3 was conducted for comparison, which was denoted as HTLS.

2.3 Preparation of Fe-SNXC@T

To synthesize Fe-SNXC@T (X represents the mass ratio of melamine to Fe–LS, and T represents the carbonization temperature), Fe–LS was mixed with a certain amount of melamine (the mass ratios of melamine to Fe–LS were 2:1, 4:1, 6:1, and 8:1) and grinded for 20 min. The mixture was heated to a targeted temperature (800, 900 or 1000 °C) for 2 h at a heating rate of 5 °C min−1 in a N2-filled tube furnace. The control sample Fe-SC@900 was obtained by direct carbonizing Fe–LS without melamine. HTLS was mixed with melamine and carbonized in the same condition for synthesizing SN6C@900. Cu-SN6C@900 was synthesized using a similar procedure of Fe-SN6C@900 by replacing FeCl3·6H2O with CuCl2·2H2O. Fe-SN6C@900-A and Fe-SN6C@900-U were fabricated using a similar procedure of Fe-SN6C@900 by replacing melamine with NH4Cl or urea, respectively.

2.4 Characterizations

Scanning electron microscopy (SEM) images were carried out on a scanning electron microscope (FE-SEM Merlin, Zeiss) at an acceleration voltage of 5 kV. The dimension and internal structures of samples were characterized by a transmission electron microscopy combined with high-resolution imaging feature (TEM, JEM-2100F) operating at 200 kV. Fourier transform Infrared (FT-IR) data were recorded on a Fourier transform IR spectrometer (VERTEX 70, Bruker Corp., Germany). Element analysis was carried out on an elemental analyzer (VarioEL III, Elementar), and the chemical composition and structure of samples were determined by X-ray photoelectron spectrum (XPS, Thermo Scientific ESCALAB 250Xi spectrometer) with an exciting source of Al Kα (1286.6 eV). X-ray diffraction (XRD) spectra were recorded using a Bruker D8 diffractometer with Cu-Kɑ radiation (40 kV and 40 mA, X = 0.15418 nm). Raman spectra were carried out by a Raman spectrometer (LabRAM ARAMIS-Horiba Jobin Yvon) with a 532 nm excitation. N2 adsorption–desorption isotherms (Micromeritics, ASAP 2460) were measured at − 196 °C to analyze the specific surface area and pore structure. Prior to analysis, samples were degassed in a vacuum at 180 °C for at least 12 h. Electrical conductivity was evaluated based on the standard four-probe technique at the pressure of 15 MPa. Contact angle was tested on optical contact angle & interface tension meter (Biolin Scientific, Attension Theta Flex).

2.5 Supercapacitance measurements

The capacitance measurements were carried out on a CHI760E electrochemical workstation. The working electrode was prepared as follows: 5 mg carbon sample was dispersed in 1 mL ethanol solution (containing 10 μL 5 wt% Nafion). The suspension was sonicated to form a homogeneous suspension, and 5 μL above suspension was coated on the polished glassy carbon (D = 3 mm) as a working electrode with a mass loading of 0.35 mg cm−2. Cyclic voltammetry (CV), galvanostatic charge–discharge (GCD) and electrochemical impedance spectroscopy (EIS) were measured at room temperature. The EIS was conducted at open circuit voltage in the frequency ranging from 10 mHz to 100 kHz.

In a three-electrode system, the measurements were carried out in 1 M H2SO4 aqueous solution. Ag/AgCl electrode and Pt wire were used as reference electrode and counter electrode, respectively. The specific gravimetric capacitances of the electrodes determined from the CV curves were calculated from the following equation:

$$C = \smallint I{\text{d}}V/\upsilon m\Delta V$$
(1)

where, I is the current (A), υ is the scan rate (V s−1), m is the mass of the electrode (g), and ∆V is the potential window (V).

The specific gravimetric capacitances of the electrodes determined from the GCD curves were obtained from the following equation:

$$C = I\Delta t/m\Delta V$$
(2)

where, I is the current loaded (A), ∆t is the discharge time (s), m is the mass of the electrode (g), and ∆V is the potential window (V).

In a two-electrode system, two electrodes with the same mass were detected as a symmetrical supercapacitor in 1 M Na2SO4 aqueous solution. The specific gravimetric capacitance for a single electrode was calculated from the following equation:

$$C_{S} = 4I\Delta t/m\Delta V$$
(3)

where, I is the current (A), ∆t is the discharge time (s), m is the total mass of two electrodes (g), and ∆V is the potential window (V).

The energy density and power density of the symmetrical supercapacitor were determined using the following equations:

$$E = C_{t} \Delta V^{2} /2 \times 3.6$$
(4)
$$P = 3600\;E/\Delta t$$
(5)

where, P is the power density (W kg−1), E is the energy density (Wh kg−1), Ct is the specific capacitance of the total symmetrical system (F g−1), ∆V is the potential window (V), and ∆t is the discharge time (s).

3 Results and discussion

3.1 Physicochemical structures

Figure 1 illustrates the fabrication of Fe-SNXC@T (X represents the mass ratio of melamine to Fe–LS, and T represents the carbonization temperature) through the assembly of metal ions and lignosulfonate and followed by a subsequent heat treatment with melamine. First, Fe ions were coordinated with hydrophilic groups (e.g., sulfonate and phenolic hydroxyl groups) in lignosulfonate to form Fe–LS complex. Then, by carbonizing the mixture of Fe–LS and melamine, Fe-SNXC@T with successful N, S co-doping was synthesized. Moreover, owing to the abundance of lignosulfonate and the cost-effective strategy, Fe-SNXC@T can be fabricated in a kilogram-level (Additional file 1: Fig. S1), suggesting its potential industrial application.

Fig. 1
figure 1

Schematic illustration of the fabrication of Fe-SNXC@T

The intrinsic S source in lignosulfonate was confirmed by elemental analysis, and is determined to be 5.90 wt% (Additional file 1: Table S1). In the Fourier transform Infrared (FT-IR) spectrum of lignosulfonate, the absorption band at 1043 cm−1 is related to the S–O vibration in sulfonate groups, while the band at 525 cm−1 is attributed to the C–S vibration (Additional file 1: Fig. S2a) [27]. With the addition of FeCl3, lignosulfonate and Fe composite without hydrothermal treatment (named as Fe–LS-without HT) exhibits a new Fe–O absorption band at 596 cm−1, verifying the coordination between Fe and lignosulfonate [27]. As shown in SEM images, Fe–LS-without HT is compact and lumpy without visible pore (Additional file 1: Fig. S3a), and HT–LS obtained by hydrothermal treatment of pure lignosulfonate is also irregular and lumpy (Additional file 1: Fig. S3b). In contrast, Fe–LS complex is composed of loosely packed carbon nanoparticles (Additional file 1: Fig. S3c and d), indicating that the hydrothermal treatment with the presence of Fe can affect the structure. To further investigate the influence of the Fe coordination on structure, FT-IR spectra of LS, HT–LS and Fe–LS complex were carried out (Additional file 1: Fig. S2b). As compared with LS, the adsorption bands of HT–LS exhibit negligible change, indicating that the original structure of lignosulfonate is retained at 180 °C, since the cleavage of aryl–ether bond cannot occur at a low temperature. However, in the FT-IR spectrum of Fe–LS, the C–O–C absorption band at 1115 cm−1 disappears, implying the breakage of C–O bond, probably owing to destabilization of C–O–C bond induced by metal complexation and formation of free radicals through electron transfer between aromatic structure with metal cations [28]. Meanwhile, the presence of S in Fe–LS can be detected by scanning electron microscopy with energy dispersive X-ray spectroscopy (SEM–EDX), and the composition of the elements is presented in Additional file 1: Fig. S4. The X-ray photoelectron spectroscopy (XPS) survey spectrum of Fe–LS also demonstrates the presence of C, O, and S (Additional file 1: Fig. S5a). The high-resolution C 1s spectrum reveals the existence of four peaks at 284.4, 285.2, 286.2, and 288.5 eV, corresponding to C–C, C–O, C–S, and C=O groups, respectively (Additional file 1: Fig. S5b) [29]. For the high-resolution S 2p spectrum (Additional file 1: Fig. S5c), the peaks appearing at 163.5 and 164.7 eV correspond to S 2p3/2 and S 2p1/2 of thiophene S (C–S–C), while the peaks at 167.8 and 169.1 eV represent the oxidized S (–SOX–) [10, 29].

Fe–LS and HT–LS were mixed with melamine and then carbonized to obtain N, S co-doping carbons Fe-SNXC@T and SN6C@900, respectively. As shown in Fig. 2a, SN6C@900 displays a compact structure without visible pores, which is similar to that of HT–LS. Fe-SN6C@900 retains the same particle-packed structure to Fe–LS (Fig. 2b and c). Interestingly, some nanosheets are detected around the particles, which are supposed to facilitate the ion/electron transport [30]. Fe-SC@900 without melamine, however, reveals a particle-packed structure without any nanosheet (Fig. 2d), suggesting that the cooperation of melamine and Fe–LS can induce the formation of carbon nanosheets. The morphologies of Fe-SN6C@T obtained at 800 and 1000 °C are shown in Fig. 2e and f. Fe-SN6C@800 displays a similar architecture to Fe-SN6C@900, while Fe-SN6C@1000 reveals more collapsed particles due to the severe carbonization at a higher temperature. In addition, SEM images of Fe-SNXC@900 prepared from different melamine contents are shown in Additional file 1: Fig. S6. Fe-SN4C@900 (Additional file 1: Fig. S6b) also contains some nanosheets, while Fe-SN2C@900 (Additional file 1: Fig. S6a) with less melamine content is only composed of particles. Fe-SN8C@900 (Additional file 1: Fig. S6c) with more melamine content, however, shows more packed sheets, possibly resulting from the self-packed and aggregation of the excessive melamine. Therefore, the morphology and structure of Fe-SNXC@T can be easily controlled by adjusting the carbonization temperature and melamine content. Meanwhile, the SEM–EDX of Fe-SN6C@900 confirms the successful doping of N and S contents (Additional file 1: Fig. S7). Furthermore, in addition to Fe, such a synthetic strategy can be extended to other metals such as Cu. As shown in Additional file 1: Fig. S8, the resultant carbon Cu-SN6C@900 exhibits a particle-packed structure with some nanosheets, which is similar to that of Fe-SN6C@900.

Fig. 2
figure 2

SEM images of a SN6C@900, b, c Fe-SN6C@900, d Fe-SC@900, e Fe-SN6C@800, and f Fe-SN6C@1000. gi Transmission electron microscopy (TEM) images of Fe-SN6C@900

The detailed and internal structure of Fe-SN6C@900 was conducted by TEM, as shown in Fig. 2g–i. Particle-packed structure with interconnected nanosheets is observed, in a good agreement with SEM analysis (Fig. 2g and h). These interconnected nanosheets around the carbon particles can well facilitate ion/electron transport, and thus may promote the supercapacitance performances [30, 31]. Notably, some nanopores are observed via the high-resolution TEM, which are favorable for the mass transfer. The high-resolution TEM also indicates a partial graphitization structure with disordered carbon and some graphitic lattice fringes, which can enhance the conductivity of carbon (Fig. 2i) [32]. Specifically, the electrical conductivity of Fe-SN6C@900 is detected to be up to 46.8 S m−1, which can facilitate the electron transport and thus enhance the electrochemical performances.

The Raman spectra of Fe-SN6C@T display two broad peaks at 1335 and 1585 cm−1, corresponding to the disordered (D) and graphitic (G) bands, respectively (Fig. 3a). The intensity ratios of D band to G band (ID/IG) for Fe-SN6C@800, 900, and 1000 are 0.96, 0.88, and 0.84, respectively, suggesting that a higher carbonization temperature will promote the graphitization [33]. Additionally, the ID/IG of Fe-SN6C@900 (0.88) is lower than that of SN6C@900 (1.02), indicating that the addition of Fe can enhance the graphitization degree (Additional file 1: Fig. S9). The XRD spectra of Fe-SN6C@T reveal two broad and low-density peaks at 2θ = 24.3 and 43.6°, attributed to the (002) and (100) graphitic planes, respectively, further confirming the partial graphitization (Fig. 3b) [34].

Fig. 3
figure 3

a Raman and b X-ray diffraction (XRD) spectra of Fe-SN6C@800, Fe-SN6C@900, and Fe-SN6C@1000. c N2 adsorption–desorption isotherms of Fe-SN6C@900, SN6C@900, and Fe-SC@900. d Pore size distribution curves of Fe-SN6C@900, SN6C@900, and Fe-SC@900

The N2 adsorption–desorption isotherms of Fe-SN6C@T, SN6C@900, and Fe-SC@900 are displayed in Fig. 3c and Additional file 1: Fig. S10. As shown in Fig. 3c, all samples reveal combining isotherms of type I and IV, demonstrating the co-existence of micropores and mesopores [35, 36]. The BET (Brunauer–Emmett–Teller) specific surface areas (SBET) calculated from N2 adsorption–desorption isotherms are summarized in Additional file 1: Fig. S10b and Table S2. In comparison to SN6C@900 (91 m2 g−1) and Fe-SC@900 (338 m2 g−1), Fe-SN6C@900 displays a much higher SBET (542 m2 g−1), owing to the loosely particle-packed structure and graphitized nanosheets with numerous pores (as indicated by SEM and TEM analyses). The SBET of Fe-SN6C@900 (542 m2 g−1) is higher than that of Fe-SN6C@800 (359 m2 g−1), suggesting that a higher carbonization temperature will increase specific surface area. Particularly, Fe-SN6C@1000 displays a relatively lower SBET of 392 m2 g−1 as compared with Fe-SN6C@900, which may result from the partial collapse structure at the severe carbonization temperature. The pore size distribution curves are shown in Fig. 3d. SN4C@900 exhibits the least micropores and mesopores, and Fe-SC@900 possesses numerous micropores less than 0.5 nm. However, Fe-SN6C@900 exhibits a porous structure with abundant pores ranging from 0.8 to 2.2 nm (peak value at ~ 1.2 nm), which is believed to be the rational porous structure for electrochemical applications [37, 38].

To further investigate the chemical composition and surface chemistry of the as-prepared carbons, elemental analysis and XPS measurement were carried out. As shown in Additional file 1: Table S1, all Fe-SNXC@T display high N content (6.07–12.82 wt%) and relatively low self-doping S content (0.43–2.33 wt%). Obviously, as the carbonization temperature increases, the N content of Fe-SN6C@T decreases gradually, indicating a severer decomposition of nitrogen at high temperature. Meanwhile, the N content of Fe-SNXC@900 gradually rises (6.07–9.23 wt%) by increasing melamine. Particularly, Fe-SN6C@900 displays a higher N content (8.47 wt%) than SN6C@900 (4.81 wt%), possibly indicating that as compared with the irregular and lumpy structure of HT-LS, the particle structure of Fe–LS is beneficial to the nitrogen fixation.

The XPS spectra of the samples are displayed in Fig. 4, Additional file 1: Figs. S11 and S12. In the low-resolution spectra of Fe-SN6C@T and SN6C@900, C, N, and O are detected (Fig. 4a), demonstrating the successful doping of nitrogen. The high-resolution N 1s spectra of Fe-SN6C@T (Fig. 4b, e and f) and SN6C@900 (Additional file 1: Fig. S11) show that four kinds of N species have been doped into the carbon framework. The four peaks at 398.2, 399.4, 400.9, and 402.5 eV are attributed to pyridinic-N, pyrrolic-N, graphitic-N, and oxidized-N atoms, respectively [29, 39]. Among these four kinds of N species, pyridinic and pyrrolic-N are believed to provide pseudo-capacitance, while graphitic-N may enhance the conductivity [9, 40]. The relative concentrations of N species (Additional file 1: Table S3) show that with the increase of carbonization temperature, the concentration of graphitic-N rises gradually, indicating a higher graphitization degree. In the high-resolution S 2p spectra of Fe-SN6C@900 (Fig. 4c) and Fe-SC@900 (Fig. 4d), two peaks at 163.9 and 165.4 eV are consistent with S 2p3/2 and S 2p1/2 of thiophene S (C–S–C), which are supposed to give a positive charge to C atoms and thus increase storage capability. The peak at 168.3 eV corresponds to oxidized S (–SOx–), which is anticipated to produce pseudo-capacitance [10, 41]. Furthermore, N and S located at the carbon network are reported to improve the wettability and thus increase the accessibility of electroactive surface area [8, 42]. As shown in Additional file 1: Fig. S13, the contact angles of Fe-SN6C@900 and Fe-SC@900 are 60.5° and 97.4°, respectively, indicating that N doping can effectively improve the wettability, and thus facilitate the electrolyte ion diffusion.

Fig. 4
figure 4

a XPS spectra of Fe-SN6C@800, Fe-SN6C@900, Fe-SN6C@1000, and SN6C@900. High-resolution b N 1s spectrum and c S 2p spectrum of Fe-SN6C@900. d High-resolution S 2p spectrum of Fe-SC@900. High-resolution N 1s spectra of e Fe-SN6C@800 and f Fe-SN6C@1000

3.2 Electrochemical performances

The as-prepared carbon materials with heteroatoms (N and S) co-doping can be utilized as electrodes for supercapacitors. The performances of the samples in a three-electrode system are displayed in Fig. 5. The cyclic voltammetry (CV) curve of Fe-SN6C@900 reveals a rectangular-like shape with a small hump, indicating the existence of both electrical double layer capacitance and pseudo-capacitance (Fig. 5a). The pseudo-capacitance contribution may result from the reversible electro-chemical reactions of nitrogen and sulfur functionalities [8, 43]. The capacitance calculated from CV curve of Fe-SN6C@900 is 470 F g−1, which is remarkably higher than those of SN6C@900 (144 F g−1), Fe-SC@900 (155 F g−1), and Fe-SN6C@900-without HT (209 F g−1, Additional file 1: Fig. S14). Meanwhile, N doping carbons with high performances can be also fabricated by replacing melamine with other nitrogen sources (e.g., NH4Cl or urea). As shown in Additional file 1: Fig. S15, the capacitances calculated from CV curves of Fe-SN6C@900-A (using NH4Cl as nitrogen source) and Fe-SN6C@900-U (using urea as nitrogen source) are 458 and 369 F g−1, respectively, which are comparable to that of Fe-SN6C@900 (470 F g−1). Furthermore, by replacing Fe with Cu, the resultant carbon Cu-SN6C@900 also exhibits a high capacitance of 370 F g−1, indicating that such synthetic strategy can be extended to other metals (Additional file 1: Fig. S16). The excellent supercapacitance performance of Fe-SN6C@900 may derive from the high SBET (542 m2 g−1) with rational porous structure, more doping heteroatoms (8.47 wt% for N and 2.56 wt% for S), and high concentrations of active N species (35.34% for pyridinic-N, 23.67% for pyrrolic-N, and 31.80% for graphitic-N), as shown in Additional file 1: Tables S1, S2 and S3. The pyridinic and pyrrolic-N are believed to be responsible for pseudo-capacitance effect, whereas the graphitic N can enhance electrical conductivity and facilitate electron transfer [8, 9]. The proposed reactions of N and S species are summarized as follows [8]:

Fig. 5
figure 5

a CV curves of Fe-SN6C@900, SN6C@900, and Fe-SC@900. b CV curves and c galvanostatic charge–discharge (GCD) curves of Fe-SN6C@800, Fe-SN6C@900, and Fe-SN6C@1000. d GCD curves of Fe-SN2C@900, Fe-SN4C@900, Fe-SN6C@900, and Fe-SN8C@900. e Capacitances derived from GCD curves. f CV curves at various scan rates and g GCD curves at various current densities of Fe-SN6C@900. h The specific capacitances of Fe-SN6C@900 at different current densities and different scan rates. i GCD cycling curves of Fe-SN6C@900. Inset: CV curves at the first and last cycle

Pyrrolic-N.

figure b

Pyridinic-N.

figure c

Oxidized S

$$> {\text{S}} = {\text{O}} + 2{\text{OH}}^{ - } \leftrightarrow \; > {\text{SOO}} + 2{\text{e}}^{ - } + {\text{H}}_{2} {\text{O}}$$

Particularly, the carbonizing temperature has a significant influence on physicochemical properties, which may result in regulable electrochemical performances. The capacitance performances of Fe-SN6C@T fabricated from different temperatures were investigated, and the results are shown in Fig. 5b, c, and Additional file 1: Figs. S17, S18 and S19. In the CV curves, all Fe-SN6C@T show a quasi-rectangular shape, and the GCD curves exhibit a quasi-triangle shape with a small distortion, indicating the presence of pseudo-capacitance resulting from the heteroatoms doping [44]. The specific capacitances at 1 A g−1 for Fe-SN6C@800, Fe-SN6C@900, and Fe-SN6C@1000 are 244, 304, and 285 F g−1, respectively (Fig. 5e). The highest capacitance of Fe-SN6C@900 ascribes to the relatively higher SBET, graphitic degree, and heteroatom content, as certified in Fig. 3 and Additional file 1: Tables S1, S2 and S3. Meanwhile, the Nyquist plots of Fe-SN6C@T are shown in Additional file 1: Fig. S19. In the low-frequency region, a steep capacitive spike is observed, suggesting an ideal capacitance behavior [45]. The real axis intercepts representing the equivalent series resistances of Fe-SN6C@900 (3.6 Ω) and Fe-SN6C@1000 (5.2 Ω) are significantly lower than that of Fe-SN6C@800, indicating that Fe-SN6C@900 and Fe-SN6C@1000 have a higher conductivity [46].

Since the N content plays an important role in the capacitance performances, the electrochemical properties of Fe-SNXC@900 prepared from different melamine contents were investigated, as shown in Fig. 5d and Additional file 1: Figs. S20, S21 and S22. Noticeably, Fe-SN6C@900 (304 F g−1) possesses a higher specific capacitance than Fe-SN2C@900 (170 F g−1), Fe-SN4C@900 (263 F g−1), and Fe-SN8C@900 (233 F g−1) (Fig. 5e), which can be explained by its suitable N content and higher concentration of electrochemically active N species, as indicated by Additional file 1: Fig. S12, Tables S1 and S3. The Nyquist plots show that Fe-SN2C@900, Fe-SN4C@900, Fe-SN6C@900, and Fe-SN8C@900 possess low equivalent series resistances of 4.4, 5.2, 3.6, and 5.0 Ω, respectively, suggesting their high conductivity (Additional file 1: Fig. S22).

The CV curves at various scan rates and GCD curves at different current densities of Fe-SN6C@900 are displayed in Fig. 5f and g. Remarkably, the CV curve of Fe-SN6C@900 remains a rectangular-like shape even at a scan rate of 200 mV s−1 (Fig. 5f), and the capacitance retention (from 5 to 200 mV s−1) is high up to 77.3% (Fig. 5h), suggesting a superior rate capability [47]. Additionally, the GCD curves of Fe-SN6C@900 reveal quasi-symmetrical triangular shapes at various current densities, demonstrating an outstanding electrochemical reversibility and columbic efficiency (Fig. 5g). The corresponding capacitance of Fe-SN6C@900 is as high as 390 F g−1 at 0.5 A g−1 and remains 228 F g−1 at 10 A g−1 (Fig. 5h). The specific capacitance of Fe-SN6C@900 (390 F g−1 at 0.5 A g−1) outperforms those of many other biomass-derived carbon materials, including activated carbons, heteroatoms-doping carbons, carbon nanospheres, and so on (Additional file 1: Table S4) [48,49,50,51,52,53,54,55,56,57]. Furthermore, the stability of Fe-SN6C@900 was conducted by repeated GCD test at 5 A g−1. Fe-SN6C@900 displays an outstanding durability with a capacitance retention of ~ 102%, and the slightly increasing capacitance possibly ascribes to the enhance of the ion accessibility after the long-term cycling (Fig. 5i) [58]. The CV curves of Fe-SN6C@900 at the first and last cycles show no visible change, further certifying its electrochemical stability (the inset of Fig. 5i).

The two-electrode symmetric capacitance behavior of Fe-SN6C@900 was conducted in 1 M Na2SO4 solution. The CV curve is almost rectangular in the potential window of 0–1.6 V (Fig. 6a). The symmetric capacitance behavior of Fe-SN6C@900 was investigated at the voltage range of 0–1.6 V. The CV curves at various scan rates remain a rectangular shape without distinct distortion (Fig. 6b). Furthermore, the GCD curves at different current densities display symmetric triangle shapes, again indicating a superior electrochemical reversibility and high columbic efficiency (Fig. 6c). The specific capacitance at 0.5 A g−1 is 165 F g−1 (Fig. 6d), and maintains 111 F g−1 at 10 A g−1. Additionally, Fe-SN6C@900-based symmetric supercapacitor reveals an energy density of 14.7 W h kg−1 at the power density of 450 W kg−1 and remains 12.2 W h kg−1 at 4500 W kg−1, which are comparable to those of many other biomass-derived carbons, conventional active carbon, graphene, or carbon nanotube (color dots in Fig. 6e) [50, 51, 53, 54, 57, 59,60,61,62,63,64,65,66].

Fig. 6
figure 6

a CV curves at various operation potential, b CV curves at various scan rates, c GCD curves at various current densities, and d specific capacitances of Fe-SN6C@900 symmetrical supercapacitor. e Comparison about energy density for various carbon materials

4 Conclusion

We propose a promising approach for synthesizing carbon materials (Fe-SNXC@T) from lignosulfonate via self-assembly of Fe ions and lignosulfonate and followed by a thermal treatment with melamine. As compared with samples achieved at 800 or 1000 °C, Fe-SN6C@900 exhibits relatively higher SBET, graphitic degree, and heteroatom content, resulting in the highest capacitance. Meanwhile, the capacitance of Fe-SN6C@900 reaches the summit among various samples with different melamin contents, since Fe-SN2C@900 with less melamine content shows a small amount of N doping, while Fe-SN8C@900 with excessive melamine reveals a self-packed structure. Therefore, owing to the spherical structure with graphitized nanosheets, high specific surface area with rational pores, and successful N and S co-doping, the optimal carbon material (Fe-SN6C@900) exhibits excellent supercapacitance performances with high specific capacitance (390 F g−1), high energy density (14.7 W h kg−1), and outstanding durability. Considering the facile strategy and high electrochemical performances, this research offers a valuable approach for the conversion of biomass (such as chitosan, collagen, and gelatin) into renewable carbon materials for energy-related applications.