One-pot preparation of magnetic nitrogen-doped porous carbon from lignin for efficient and selective adsorption of organic pollutants

Organic pollutants pose a serious threat to water environment, thus it is essential to develop high-performance adsorbent to remove them from wastewater. Herein, nitrogen-doped magnetic porous carbon (M-PLAC) with three-dimensional porous structure was synthesized from lignin to adsorb methylene blue (MB) and tetracycline (TC) in wastewater. The calculated equilibrium adsorption amount by M-PLAC for MB and TC was 645.52 and 1306.00 mg/g, respectively. The adsorption of MB and TC on M-PLAC conformed to the pseudo-second-order kinetic model. The removal of MB by M-PLAC showed fast and efficient characteristics and exhibited high selectivity for TC in a binary system. In addition, M-PLAC was suitable for a variety of complex water environments and had good regeneration performance, demonstrating potential advantages in practical wastewater treatment. The organic pollutant adsorption by M-PLAC was attributed to electrostatic interaction, hole filling effect, hydrogen bonding, and the π-π interaction.


Introduction
Nowadays, the discharge of organic pollutants in wastewater has gradually become an environmental issue. Solving the pollution of water by organic dyes and antibiotics is one of the important challenges. Various important fields use organic dyes because of their color rendering properties (Katheresan et al. 2018). Most organic dyes have complex aromatic structures and are refractory, carcinogenic, and mutagenic (Moussavi et al. 2016;Wang et al. 2016). Methylene blue (MB) is widely applied in industrial and food production. Long-term exposure to MB-rich waste fluid will harm aquatic plants and organisms, resulting in serious damage to the human body (Jiao et al. 2022;Kundu et al. 2018). Similarly, antibiotics have attracted extensive concern in recent years ). Among them, tetracycline (TC) is extensively applied to animal husbandry and aquaculture. Nevertheless, most TC is difficult to metabolize through the digestive systems of living organisms and can only be excreted in urine and feces, thus TC is released into the aquatic system in its original form (Leong et al. 2016). The TC released into the water environment will not only harm human health and ecological balance, but also cause drug resistance of micro-organisms (Xie et al. 2019). Therefore, how to efficiently and quickly remove organic pollutants in water environment has become the key to water pollution research.
At present, several methods including adsorption , membrane separation , photocatalytic degradation (Wu et al. 2022), biodegradation (Xiong et al. 2017), and redox (Kueasook et al. 2020) have been fully developed to treat wastewater rich in organic pollutants. Among them, the adsorption method is regarded as an attractive approach because of its advantages of low energy consumption, simple operation, environmental friendliness, and no secondary pollution . Various materials have been developed to adsorb organic pollutants, such as graphene oxide (Salas et al. 2010), metal-organic frameworks , zeolite (Seredych and Bandosz 2007), and carbon nanotubes (Cheng et al. 2019). However, these materials still face problems such as cumbersome preparation process, poor selectivity, insufficient adsorption capacity, and secondary pollution . Compared with these adsorbents, porous carbon is identified as the most effective adsorbent due to its relatively low investment, high modifiability, huge surface area, and abundant porous structure .
Lignin, as a special class of renewable polyhydroxyl aromatic polymers, is widely present in plant cell walls (Bz et al. 2020). The abundant oxygen-containing groups in lignin, such as hydroxyl, methoxy, and carbonyl, etc; show broad application prospects in terms of designability, adsorption performance, dispersibility, and affinity for organic pollutants (Cedap et al. 2020;Zhao et al. 2021). Nevertheless, almost all lignin has been burnt as fuel, which not only wastes resources, but also leads to a large number of greenhouse gas emissions (Ponomarev and Sillanpää 2019). Therefore, it is a promising alternative to make better use of lignin resources and convert them into lignin-based high-efficiency adsorbents. For instance, Sun et al. ) reported a novel modified lignin-based biochar that showed high affinity and selectivity for MB.
Although lignin-based activated carbon has improved the dye adsorption capacity to a high level, the simultaneous adsorption of two organic pollutants (TC and MB) by lignin-based activated carbon is rarely reported. Therefore, it is urgent to design a lignin-based activated carbon to remove different organic pollutants. At present, most studies only pay attention to the large adsorption amount of adsorbent, but often ignore the key characteristic of adsorption rate. At the same time, nitrogen doping can endow the activated carbon surface with unique electronic properties and abundant functional groups, thereby accelerating the adsorption efficiency.
Herein, we successfully prepared a lignin-based nitrogen-doped magnetic porous carbon via the facile one-pot method, which is expected to achieve rapid and efficient removal of MB and TC in wastewater within a wide pH range. The structural characterizations of porous carbon were investigated by SEM, N 2 physical adsorption, XRD, FT-IR, and TG. The impacts of the initial pH of the solution, pollutant concentration, adsorption time, system temperature, and water quality were systematically studied. Ultimately, the removal mechanism was obtained through adsorption kinetics, isotherms, and thermodynamics research.

Materials
The purified lignin (PL) was procured from black liquor by sulfuric acid precipitation method   . The deionized water was purchased from Qingdao Jingke Instrument Reagent Co., LTD., and the tap water came from a waterworks in Qingdao. The seawater was taken from a bathing beach in Qingdao, and the lake water originated from Yanhu Lake in Shandong University of Science and Technology.

Preparation of M-PLAC
The process of preparing M-PLAC by the one-pot method was as follows (Scheme 1): 2 g of PL was mixed with 50 mL of 0.3 M ferric nitrate solution in a beaker and then 2 g of urea and potassium hydroxide (2 g) were sequentially added to the mixed solution. After stirring at 25 °C for 2 h, the mixed solution was put into an oven at 105 °C until dried to get the nitrogen-doped magnetic precursor. The pyrolysis process was carried out in a tube furnace (PT-T1200). Under 50 mL/min nitrogen atmosphere, the precursor was calcined at 800 °C for

Characterization
The surface microstructure and energy dispersive spectroscopy (EDS) of M-PLAC were detected by scanning electron microscopy (SEM, Apreo, FEI, Hillsboro, USA). Micromeritics ASAP 2020 system was applied to investigate the N 2 adsorption and desorption isotherms of M-PLAC at 77 K. The S BET and pore distribution of M-PLAC were calculated by the BET method and DFT equation, respectively. The inorganic crystal forms were determined using X-ray diffraction (XRD, Riaku Utima IV) in the range of 5° to 85°. The Fourier-transform infrared spectroscopy (FT-IR, Nicolet 380) was applied to investigate the functional groups of samples. Thermogravimetric (TG) curve of M-PLAC was analyzed via a thermal analyzer system (Mettler TGA 2, Swiss), which was scanned from 30 °C to 1000 °C at 10 °C/min under N 2 atmosphere (100 mL/min).

Adsorption experiments
In a constant temperature shaker, 0.03 g of M-PLAC was added to 50 mL of different concentrations of MB (from 300 to 600 mg/L) or TC (from 300 to 800 mg/L) solution at 35 °C and 150 rpm. At different intervals, 1 mL of the mixed suspension was taken out for measurement. All tests were made in duplicate, and the results were averaged. Moreover, the impacts of various parameters including solution pH, system temperature, and adsorption time on MB and TC adsorption were studied. The  (1)

Fast adsorption and selectivity adsorption
The fast adsorption experiment was conducted with low concentration of pollutants. The concentration of MB and TC solution was 50 and 100 mg/L, respectively. The selectivity adsorption experiment was conducted in a binary system of MB (50 mg/L) and TC (100 mg/L).

Effect of water quality
Deionized water, tap water, lake water, and sea water were used to prepare 300 mg/L MB or TC solutions, and 0.03 g M-PLAC was evenly mixed in the above solutions until adsorption equilibrium.

Regeneration and reusability of M-PLAC
Specifically, 0.03 g M-PLAC was mixed in 50 mL MB or TC solution (300 mg/L). After adsorption, M-PLAC covered with MB (or TC) was evenly dispersed in 0.1 M NaOH solution for separation, followed by washing with deionized water and anhydrous ethanol. The experiment went through five adsorption-desorption cycles, and the supernatant was measured in each cycle to obtain the q e and removal rate.

Characterizations of M-PLAC
The microscopic morphology and morphological structure of M-PLAC are depicted in Fig. 1 (Table S1), which also proves the successful introduction of Fe 3 O 4 and N elements. The addition of nitrogen increases the negative charge density of M-PLAC, thus enhancing the interaction between the adsorbent and the pollutant cation, thus achieving excellent adsorption performance (Cao et al. 2016). Moreover, specific types of nitrogen functional groups on the M-PLAC surface are also generally considered adsorption sites (Chen et al. 2013;Yang et al. 2020). As a result, the unique morphology and surface characteristics of M-PLAC fully demonstrate its adsorption potential. The porosity of M-PLAC was analyzed by the N 2 adsorption-desorption isotherm. As illustrated in Fig. 2a, the isotherm is typical type IV based on IUPAC classification (Cui et al. 2018). The adsorption capacity of N 2 rises promptly at low P/P 0 , which proves the microporous properties of M-PLAC. Afterwards, the N 2 adsorption capacity rises slowly with increasing P/P 0 , indicating that there are amounts of mesoporous in M-PLAC. In addition, there is an obvious H4-type hysteresis loop on the isotherm, representing the capillary condensation of N 2 in the mesopores ).  According to the pore size distribution curve of M-PLAC, most of the pores are concentrated below 10 nm (Fig. 2b), which suggests that M-PLAC is mainly composed of mesopores and micropores. A weak peak appears in the range of about 100 nm, suggesting the presence of a small number of large pores in M-PLAC. The average pore size (D p ) of M-PLAC is only 2.99 nm, while the total pore volume (V tot ), the micropore volume (V mic ), and the external area volume (V ext ) are 0.9359, 0.4386, and 0.4977 cm 3 /g, respectively. Ultra-high S BET and rich pore structure increase the contact area between organic pollutants and M-PLAC and provide more adsorption sites for adsorption reactions .
The XRD pattern of M-PLAC is illustrated in Fig. 2c. The derivative peaks at 2θ = 26.4° and 43.5° represent the (002) and (100)  The TG/DTG measurements in N 2 atmosphere were designed to assess the weight loss of M-PLAC over the temperature range of 300-1000 °C. As displayed in Fig. 2d, there are roughly four stages in the weight loss curve of M-PLAC. The first occurrence of weight loss (14.76%) in the range of 30-160 °C is attributed to the release of adsorbed water on the M-PLAC surface (Pan et al. 2017).
With increasing temperature from 160 to 730 °C, 15.50% of the weight loss may be caused by the elimination of unstable functional groups ). The 13.26% of weight loss in the third stage (730-830 °C) is caused by the decomposition of more stable functional groups. In addition, the combustion of the carbon skeleton is the main cause of weight loss at higher temperature (Pan et al. 2017). Figure 3 compares the MB and TC adsorption capacity of PL and activated carbons prepared by different methods under the same experimental parameters. Obviously, the adsorption performance of M-PLAC prepared by the onestep method is much better than that of PL and M@PL-AC prepared by the two-step method. The q e and removal rate of MB by M-PLAC are 438.80 mg/g and 86.76%, respectively, while M@PL-AC is 254.29 mg/g and 50.86% and PL is only 100.33 mg/g and 20.07% (Fig. 3a). Moreover, it only takes 20 min to reach the adsorption equilibrium for M-PLAC at MB concentration of 300 mg/ L, which shows the excellent adsorption performance of M-PLAC for MB. Besides, the adsorption of TC also exhibits similar situation. The adsorption performance of M-PLAC is the best. The above results indicate that the one-step preparation method is an effective strategy. The preparation of M-PLAC by the one-step method not only is far superior to the two-step method in terms of adsorption performance, but also is more convenient and consumes less energy consumption than the twostep method. Therefore, we chose the one-step method to prepare M-PLAC and carried out the following adsorption experiments.

Effect of pollutant concentration and adsorption time
Experimental parameters, including pollutant concentration, adsorption time, and system temperature, are closely related to the adsorption capacity. According to Fig. 4a and b, as MB concentration increases from 300 to 500 mg/L, the adsorption amount at equilibrium on M-PLAC enhances from 433.86 to 534.03 mg/g. Similarly, the equilibrium adsorption amount of TC also increases with increasing TC concentration. Visibly, the mass transfer driving force generated by the concentration gradient is in favor of overcoming the resistance of pollutant molecules from the solution to M-PLAC surface and ultimately promotes the adsorption reaction (Dai et al. 2021). In addition, the adsorption equilibrium time of different organic pollutants is different. For MB, the adsorption process can be divided into two stages. At the initial contact stage, a lot of holes and active sites on M-PLAC surface are rapidly occupied by MB molecules  ). The adsorption process rapidly reaches the equilibrium stage, which reflects the potential of M-PLAC to rapidly adsorb MB. By comparison, the adsorption process of TC molecule on M-PLAC is relatively mild. There are three stages in the adsorption process of TC. The first stage is the fast adsorption stage. A linear increase of TC adsorption amount can be observed at this stage (0-4 h). The second stage is the slow adsorption stage (4-24 h). With the decrease of effective adsorption vacancies of M-PLAC, the adsorption capacity of TC increases slowly until the adsorption equilibrium (24-48 h). Figure 4c and d describe the effect of temperature on MB and TC adsorption by M-PLAC. The raising of temperature contributes to the improvement of adsorption performance. The rising temperature may increase the confusion degree of pollutant molecules, which increases the collision probability of pollutant and M-PLAC, thus further promoting the binding of pollutant molecules to the surface active sites of adsorbents. Furthermore, the increased amplitude of adsorption amount decreases as the temperature rises. When the temperature increases from 45 to 55 °C, the adsorption capacities of MB and TC increase only 0.40% and 2.17% respectively, which may be due to the saturation of M-PLAC surface active sites.

Effect of initial pH
The initial pH value is a key factor to determine the adsorption behavior. It not only affects the charge of functional groups on adsorbents, but also controls the structure and morphology of target adsorbates (Liu et al. 2014). As displayed in Fig. 5a, the pH value of zero charge (pH PZC ) of M-PLAC is 7.30. When the solution pH is lower than 7.30, M-PLAC is in a positive charge state due to protonation and gradually deprotonated to a negative charge state as pH increases (Jang et al. 2018).
TC is a complex amphoteric organic compound, which exists in four forms at different pH values: H 4 TC + with positive charge (pH < 3.3), amphoteric ion H 3 TC (3.4 < pH < 7.6), and negative charge H 2 TC − (7.6 < pH < 9.7) and HTC 2− (pH > 9.7) (Zhu et al. 2014a). By contrast, the structure of MB molecules in solution is relatively stable. According to Fig. 5b, the adsorption amount of MB on M-PLAC is little affected by the initial solution pH.
In the pH range of 2-10, the adsorption amount of MB increases slightly from 415.23 to 462.52 mg/g. Under acidic conditions, the protonated binding sites (-OH and -COOH) on M-PLAC surface are positively charged. The interaction between MB + and positively charged M-PLAC is limited by competitive adsorption and electrostatic repulsion (Yu et al. 2017). As solution pH rises, the electrostatic attraction between M-PLAC with weakened protonation on the surface and MB + becomes stronger, thus promoting adsorption. Nevertheless, the adsorption amount of MB is not significantly enhanced, indicating that other mechanisms take part in the adsorption process in addition to electrostatic interaction. In particular, π-π stacking interaction between aromatic rings in M-PLAC and MB also plays a vital role in the adsorption (Fu et al. 2016;Shen et al. 2020). Moreover, the TC adsorption on M-PLAC also shows similar results (Fig. 5c). When pH value increases from 2 to 10, the adsorption amount of M-PLAC for TC increases from 589.91 to 662.41 mg/g. It is worth noting that when pH is 8-10, a large amount of TC can be adsorbed despite the strong electrostatic repulsion between M-PLAC with negative surface charge and negative ions H 2 TC − and HTC 2− , indicating that electrostatic attraction is not the main controlling effect of adsorption. The adsorption of TC by M-PLAC is driven by multiple mechanisms including electrostatic interaction, pore-filling effect, and π-π electron-donor-receptor (EDA) Zhu et al. 2014b). The results show that M-PLAC exhibits excellent adsorption performance for MB and Scheme 2 Proposed adsorption mechanism of MB and TC on M-PLAC TC in the wide pH range, which further proves its great potential in practical wastewater treatment.

Adsorption kinetics
Pseudo-first-order (PFO) and pseudo-second-order (PSO) kinetic models were applied to evaluate the possible rate control steps during the adsorption process. The kinetic equations are shown in Eq. (3) and Eq. (4), and the fitted curves and detailed data are shown in Fig. S2 and Table 1. in which q e and q t (mg/g) mean the adsorption capacity at equilibrium and time t, respectively, and k 1 (min −1 ) and k 2 (mg/g·min) represent the rate constants of PFO and PSO.
At three concentrations of MB, the R 2 values of PSO (0.9835-0.9999) are much higher than those of PFO (0.7692-0.8433). For TC, the R 2 values of PSO are similar to those of the PFO. However, the theoretical q e calculated by PSO is more consistent with the actual q e (exp) . As an example, at 700 mg/L, the q e value calculated by PSO is 699.30 mg/g, while q e (exp) is 706.76 mg/g. Therefore, both of MB and TC adsorption on M-PLAC corresponds to PFO.
To investigate the controlling factors of adsorption diffusion, the particle internal diffusion model was applied to fit the adsorption data of MB and TC. The model mathematical representation is shown in Eq. (5).
in which q t (mg/g) denotes the adsorption amount at time t, K id (mg/g min 0.5 ) means the internal diffusion rate constant, and C means the internal diffusion model constant.
As illustrated in Fig. S2c, the fitting plot of MB can be divided into two linear ranges, demonstrating two stages in MB adsorption. The first stage is attributed to the transport of MB molecules from solution to the outer surface of M-PLAC, which is controlled by molecular diffusion and membrane diffusion (Yu et al. 2021). The second stage may be the further diffusion of MB molecules in the pores, which is a gradual internal diffusion of particles (Zeng et al. 2021). Compared with MB, the fitting diagram of TC can be divided into three linear ranges: (I) The first stage is the transfer of TC molecules from the solution to the outer surface of M-PLAC. Due to the highest initial concentration, TC molecules rapidly diffuse from the solution to the outer surface of the adsorbent under the action of high mass transfer power. (II) In the second stage, TC molecules diffuse to the inner surface (3) q e − q t = q e − k 1 t (4) = + 1 2 2 (5) = 0.5 + while occupying the adsorption sites on the outer surface ). (III) The final stage is the adsorption of TC on the inner surface of M-PLAC holes. At this stage, the residual TC concentration in the solution is low, and the adsorption rate decreases. The adsorption process gradually approaches equilibrium. In addition, the diffusion rate constants of these stages are in the order of K i,1 > K i,2 > K i,3 (Table 2), indicating that boundary layer thickness gradually thickens and boundary effect resistance gradually increases (Yu et al. 2017). The internal diffusion models of MB and TC do not pass through the origin (C ≠ 0), reflecting that internal diffusion is only one of the steps to control adsorption. The control process of adsorption rate is the result of the interaction of multiple kinetic models ).

Adsorption isotherm
Two adsorption isotherm models, Langmuir and Freundlich models, were applied to investigate the relationship between the adsorbate and the adsorbent (M-PLAC). The data were fitted using Eq. (6) and Eq. (7).
where q e (mg/g) and C e (mg/L) are the adsorption amount at equilibrium and the equilibrium concentration of MB and TC, respectively, q m (mg/g) means the theoretical saturated adsorption amount, and K L (L/mg), K F , and 1/n denote the Langmuir and Freundlich constants, respectively. Adsorption isotherm can not only easily judge the nature of adsorption, but also obtain the maximum adsorption amount under the best conditions. As illustrated in Fig. 6 and Table 3, the R 2 of the Langmuir model for MB and TC are higher than those of the Freundlich model. This result demonstrates that the Langmuir model is more suitable for the adsorption process. The adsorption of MB and TC on M-PLAC is a homogeneous and monolayer process. At 55 °C, the maximum adsorption amount of MB and TC on M-PLAC calculated by the Langmuir model is 645.52 and 1306.00 mg/g, respectively, suggesting that M-PLAC exhibits excellent adsorption effect for MB and TC.

Thermodynamic analysis
To further investigate the adsorption process and possible adsorption mechanism of MB and TC by M-PLAC, a thermodynamic analysis was carried out. Thermodynamic parameters (such as Gibbs free energy change (ΔG (kJ/mol)), enthalpy e change (ΔH (kJ/mol)), and entropy change (ΔS (J/mol/K)) at different temperatures are calculated as follows: in which K d (mL/g) is the equilibrium constant, R represents the gas constant 8.314 (J/mol/K), and T (K) is the absolute temperature. As depicted in Fig. 7, we can get the ΔH and ΔS from the slope and intercept of the straight line.
As illustrated in Fig. 7, the adsorption capacity of M-PLAC for MB and TC increases with increasing temperature. The thermodynamic parameters calculated by fitting are exhibited in Table 4. The ΔG values at all temperatures are negative, showing that the adsorption process is spontaneous. In addition, ΔG value decreases with increasing temperature, indicating that higher temperature can provide stronger driving force, which is favorable for adsorption. The positive ΔH reveals an endothermic process. The positive ΔS demonstrates the affinity of M-PLAC for MB and TC and the increased disorder of solid/liquid interface ). In addition, according to previous studies (Hu et al. 2020), the adsorption of contaminant molecules on M-PLAC reduces their disorder degree, while the disorder degree of water molecules on M-PLAC increases significantly, which further results in an enhancement in the system entropy. Therefore, the increase of ΔS is the main driving force of the adsorption process (Yu et al. 2017).

Fast adsorption and selectivity adsorption of organic pollutants
In addition to pursuing higher adsorption amount, the adsorption speed of organic pollutants is also worth paying attention to. As depicted in Fig. 8a, the maximum absorbance of MB decreases remarkably with the extension of contact time. MB in the solution is completely adsorbed by M-PLAC after only 15 min (the removal rate is 99.93%), which fully highlights the characteristics of fast adsorption rate and high adsorption efficiency of MB by M-PLAC. In addition, from the optical image in Fig. 8a, the adsorption process of MB on M-PLAC can be clearly observed through the fading of MB solution. Similarly, TC can be removed by M-PLAC after 60 min and the removal rate is 99.87% (Fig. 8b). For investigating the adsorption characteristics of M-PLAC in a complex system, the binary organic pollutant system was obtained by mixing MB and TC. As observed in Fig. 8c, both pollutants in the binary system are almost completely removed after 60 min. The removal rates of MB and TC are 99.55% and 99.83%, respectively (The removal rates of MB and TC at 15 min are only 48.34% and 62.69%, respectively). The results illustrate that the adsorption efficiency and removal rate of MB is reduced, while TC hardly has any effect compared with the single solution. In addition, by comparing the two organic molecules, TC molecules contain more aromatic structures than MB molecules, and the π-π interaction between TC and M-PLAC is stronger (Lv et al. 2021). Therefore, M-PLAC exhibits good selectivity to TC. The selectivity of M-PLAC to TC mainly depends on its abundant pore structure and surface characteristics. At the same time, the firm electrostatic interaction between the high density of negatively charged groups (such as -COOH and -OH) existing on the surface of M-PLAC and MB + also promotes the efficient adsorption of MB by M-PLAC.

Effect of water quality
For investigating the adsorption performance of M-PLAC in actual water environment, the effect of water quality (such as deionized water, tap water, lake water, and sea water) on the adsorption of organic pollutants was studied. Compared with the solution configured with deionized water, the influence of real environmental water quality on MB adsorption can be ignored (Fig. 9). In comparison, water quality has an obvious effect on TC adsorption. The adsorption efficiency of TC in tap water remains at 93.48%, while it is 84.57% and 85.97% in lake water and sea water, respectively. This may be related to the fact that solid impurities occupy the adsorption site in the real water environment and the higher ion content reduces the interaction between TC molecules and M-PLAC (Xie et al. 2016). However, the adsorption amount of TC by M-PLAC in real water environment is still as high as 447.54 mg/g. The results prove that M-PLAC can adapt to various water qualities and can remove MB and TC efficiently and conveniently.

Reusability of M-PLAC
The reusability of adsorbent is always a relatively important index to evaluate its adsorption performance in practical application. The regeneration and reusability of M-PLAC for MB and TC removal were systematically investigated. As displayed in Fig. 10a, the adsorption amount of MB is 369.06 mg/g after 5 cycles, which only drops to 85.22% of the original adsorption amount. In contrast, during TC adsorption, the larger decrease in adsorption amount originates from the irreversible loss of adsorption sites on M-PLAC surface. After 5 cycles, the adsorption amount of TC is still up to 222.51 mg/g, which maintains 51.38% of the original adsorption capacity. The results demonstrate that M-PLAC has excellent reuse performance and can be applied to treat wastewater containing MB and TC. At the same time, the magnetic separation characteristic of M-PLAC was evaluated by measuring its magnetic hysteresis curve. As illustrated in Fig. 10b, the saturation magnetization of M-PLAC is 26.02 emu/g. After adsorption, M-PLAC can be readily recovered from wastewater under the action of an external magnetic field (inset of Fig. 10b), which further simplifies the solid-liquid separation process and facilitates the recovery and reuse of M-PLAC. In addition, the correlations of the adsorption-desorption cycle are investigated in Fig. 10c and d. The R 2 of MB and TC is 0.9536 and 0.9864, respectively, indicating that the removal rate of MB and TC on M-PLAC is negatively correlated with the cycle index.

Adsorption mechanism of MB and TC on M-PLAC
The organic pollutant adsorption process involves in varieties of interactions. FT-IR was applied to explore the functional group changes of M-PLAC before and after adsorption. As illustrated in Fig. 11, after the adsorption of MB and TC, two new characteristic peaks appear at 1312 and 1464 cm −1 , representing the tensile vibration of C-N and -NH 2 of MB and TC molecules (Gautam and Hooda 2020;Zhang et al. 2014). Moreover, the intensity of O-H stretching vibration at 3413 cm −1 decreases , which lies behind the role of hydrogen bonding during adsorption process. The bands centered in 1615-1415 cm −1 are attributed to aromatic ring vibrations that originated from PL Zhou et al. 2020). The peak at 1574 cm −1 in M-PLAC is shifted to 1599 cm −1 in M-PLAC-MB. In M-PLAC-TC, there are two peaks around 1615 and 1574 cm −1 . These changes indicate the existence of π-π stacking interaction. The S BET and V tot of M-PLAC are as high as 1252.21 m 2 /g and 0.9359 cm 3 /g, which promotes the hole filling effect. Another significant interaction for the mechanism is the electrostatic attraction, which has been discussed in the pH influence section. In sum, the adsorption mechanism contains hole filling, electrostatic attraction, hydrogen bonding, and π-π stacking interaction (Scheme 2).

Conclusion
In the present work, a functional magnetic nitrogen-doped porous carbon (M-PLAC) was successfully synthesized via one-pot simple carbonization and activation using lignin as raw material and urea as a nitrogen source to remove organic pollutants MB and TC. M-PLAC had large S BET (1252.21 m 2 /g) and abundant pore structure (V tot = 0.9359 cm 3 /g). M-PLAC could effectively remove MB and TC over a wide pH range. The adsorption processes of MB and TC on M-PLAC were in accordance with PSO and Langmuir model. At 55 °C, the maximum adsorption amount of M-PLAC for MB and TC was 645.52 and 1306.00 mg/g, respectively. In terms of thermodynamics, the adsorption of MB and TC was endothermic and spontaneous. Interestingly, M-PLAC could not only efficiently remove cation MB and TC in aqueous solution, but also adapted to a variety of complex water environments, reflecting the great potential of M-PLAC in practical application. Meanwhile, M-PLAC had good reusability and was easily separated by an external magnetic field due to the presence of Fe 3 O 4 magnetic particles. In conclusion, M-PLAC is a kind of functionalized activated carbon that is simple to prepare, efficient, fast, and easy to separate, showing excellent adsorption potential in the treatment of organic pollutants in complex practical wastewater.