1 Introduction

Excessive CO2 emissions have adverse effects on the global environment and human health (Abd et al. 2021). The treatment of agricultural waste is a major contributor to agricultural greenhouse gas emissions, and leaving and returning farmland utilization generates CO2 emissions (Azmi and Aziz 2019). Biomass carbonization is an important method for treating agricultural waste and may also significantly reduce emissions (Choong et al. 2022). The main product, biochar, may be used to adsorb CO2 due to its physicochemical properties and stability (Sun et al. 2023a, b). Therefore, researchers have explored various raw materials and processes to enhance its CO2 adsorption performance (Wang et al. 2020).

The pore structure and surface functional groups jointly affect the CO2 adsorption performance of biochar. Among them, surface functional groups are an important feature affecting the chemisorption of CO2 by biochar, and heteroatom do** can improve the surface functional group properties of biochar (Wei et al. 2017). Heteroatomic functional groups generated after do** may undergo chemical reactions with CO2, thereby enhancing its adsorption. Nitrogen do** is an effective and widely studied method to improve the CO2 adsorption performance of biochar (Creamer et al. 2014). Nitrogen has an atomic size similar to carbon, giving the nitrogen-doped carbon skeleton essentially the same structure as the original material, which helps prevent other effects such as the excessive deformation of the carbon skeleton (Ding et al. 2021). Nitrogen and carbon also have similar chemical properties, which makes it easier to dope materials with nitrogen either during or after carbonization (Zhou et al. 2023a, b) investigated the effect of nitrogen and sulfur do** on the adsorption of CO2 by biochar and found that nitrogen do** alone provided the greatest improvement in the CO2 adsorption performance of biochar of 11.9%. Rao et al. (2019) exploited low-cost N-doped porous carbonaceous adsorbents with excellent CO2 adsorption properties. The optimal sample possesses high CO2 uptake of 4.50 mmol/g (298.15 K, 100 kPa). Wei et al. (2017) presented a low-cost approach for facile synthesis of nitrogen-doped porous carbons by utilizing waste longan shell. And the porous carbon shows high CO2 adsorption capacities of 4.3 mmol/g (298.15 K, 100 kPa).

Although nitrogen do** greatly improves the physicochemical properties and CO2 adsorption performance of biochar, currently used nitrogen dopants are mainly high-energy-consumption chemical products such as urea, ammonium salts, and melamine, which do not help reduce emissions and cause environmental pollution (Rao et al. 2019; Shao et al. 2022). Therefore, it is necessary to identify a new green nitrogen source to replace traditional chemical nitrogen sources to prepare nitrogen-doped biochar. Animal manure, a representative protein-based agricultural waste, has a relatively high nitrogen content and is an ideal nitrogen source for do**. Li et al. (2013) prepared biochar materials with high nitrogen contents using egg white as the raw material and showed that protein was an ideal precursor for producing nitrogen-rich carbon materials. Protein-based biomass generally exhibits poor carbonization effects, which to some extent affects nitrogen migration. Mariuzza et al. (2022) investigated the use of livestock and poultry manure to prepare charcoal via hydrothermal carbonization for soil improvement. The results showed that although hydrothermal carbonization helped retain elements such as nitrogen and phosphorus, the livestock and poultry manure showed poor carbonization effects. Reza et al. (2016) investigated the conversion mechanism of carbon and nitrogen elements in the hydrothermal carbonization products of cow manure, and the results showed that compared to lignocellulosic biomass, cow manure exhibited poorer carbonization efficiency. Dai et al. (2015) studied the fixation effect of hydrothermal carbonization of cow manure on phosphorus, and the results showed that hydrothermal carbonization was beneficial for the retention of nitrogen group elements in cow manure. Lang et al. (2018) studied the co-hydrothermal carbonization process of lignocellulosic biomass and pig manure and showed that adding lignocellulosic biomass improved the carbonization effect and enhanced the product quality. Therefore, it is necessary to explore the application potential of protein-based biomass as a substitute for traditional chemical nitrogen dopants and further analyze the carbonization do** mechanism of different nitrogen sources.

Considering the carbonization effect and the influence of other heteroatoms, this study selected cow manure with a high-fiber and low non-nitrogen content as the nitrogen source and studied its potential as a nitrogen source substitute (Shen and Zhang 2020; Xu et al. 2019). Choosing corn straw as the raw material and urea as the control nitrogen source, nitrogen-doped biochar was prepared by hydrothermal carbonization and KOH activation to adsorb CO2. The overall objectives of this study were to (i) reveal the migration patterns and forms of nitrogen atoms in cow manure as the nitrogen source, (ii) elucidate the response mechanism between the raw material ratio and the do** effect of cow manure, (iii) explore the impact of different nitrogen sources on the characteristics of biochar under the same raw material carbon-to-nitrogen ratio, and (iv) provide a theoretical basis to achieve a green preparation method for nitrogen-doped biochar.

2 Materials and methods

2.1 Materials

Nitrogen (99.999%) was purchased from Yongsheng Gas Technology Company, Ltd., Bei**g. Urea, anhydrous ethanol, and potassium hydroxide (KOH) were all purchased from Macklin Biochemical Technology Company, Ltd., Shanghai. Corn straw and cow manure were taken from the Shunyi District and Chang** District of Bei**g, respectively, and dried, crushed, and stored. The characteristics of the raw materials are shown in Table 1.

Table 1 Characteristics of raw materials

2.2 Synthesis of nitrogen-doped biochar and activated carbon

Nitrogen-doped biochar was prepared by hydrothermal carbonization. Basic information about the control group and experimental group is shown in Table 2. Raw materials were crushed into 40 mesh particles. Different quality ratios of raw materials were selected as experimental groups, indexed as HC-x:y, where x:y represents the mass ratio of corn straw to cow manure. The control group was prepared by converting the nitrogen source into urea and indexed as HC-urea. The solid total carbon-nitrogen ratio of the control group was the same as that of the experimental group with the optimal do** effect, and the amount of urea added was determined by calculation. After analysis, the mass ratio of corn straw and cow manure with the optimal do** effect in this study was determined to be 1:1. The slurry with a solids content of 15% was prepared by thoroughly mixing solid raw materials with an appropriate amount of deionized water. The hydrothermal carbonization of the slurry was performed in a sealed hydrothermal reactor (Parr 4848, USA) with a residence time of 2 h and temperature of 260 ℃ to create the biochar. The obtained samples were fully rinsed with anhydrous ethanol and deionized water and then dried at 105 ℃ for 12 h.

Table 2 Basic information of the control and experimental groups

Activated carbon was prepared from biochar activated by KOH in a tubular furnace under a N2 atmosphere. The mass ratio of biochar to KOH was 1:1, the flow rate of protective gas was 100 mL/min, the activation temperature was 550 ℃, the heating rate was 10 ℃/min, and the reaction residence time was 2 h. The obtained sample was fully washed until neutral with deionized water and then dried at 105 ℃ for 12 h. The activated carbon was indexed as AC-x:y and AC-urea.

2.3 Chemical and textural characterization

The elemental compositions of the samples were determined by element analysis (Elemantar Vario EL cube, Germany). X-ray photoelectron spectroscopy (XPS, Thermo Fisher ESCALAB 250** agents, both cow manure and urea were effective nitrogen dopants, and the do** effect of cow manure first increased and then decreased upon increasing its proportion. When the mass ratio of corn straw to cow manure was 1:1, cow manure exhibited the optimal do** effect, and the nitrogen content of biochar reached 2.53 wt.%. The lower amount of cow manure added resulted in a higher carbon-to-nitrogen ratio in the raw materials, which had a negative impact on do** (Wohlgemuth et al. 2012). Because do** and carbonization occurred simultaneously, a higher proportion of cow manure was not conducive to carbonization, which in turn affected the nitrogen do** (Wang et al. 2022). This conclusion has been confirmed by the carbon and hydrogen contents, and the C/H ratio represents the degree of carbonization and graphitization (Sun et al. 2018), where a higher ratio indicates a higher degree of carbonization. The C/H value of corn straw and cow manure after hydrothermal carbonization was negatively correlated with the proportion of cow manure. The main reason was that the wood fiber content of cow manure was low, which was not conducive to the carbonization reaction or polymerization into biochar (Roldán et al. 2016). The HC-urea prepared with the same carbon-to-nitrogen ratio as HC-1:1 showed a poor do** effect, indicating that proteins in cow manure were more prone to do** reactions during carbonization (Nazir et al. 2021). Urea may have first formed small-molecule free C-amino structures during hydrothermal carbonization and achieved do** during carbonization through the formation of carbon-carbon bonds, while proteins decreased the loss of amino groups via their own carbonization. However, both nitrogen sources could have formed free amino groups and bonded with the carbon skeleton during carbonization (Qu et al. 2023). In addition, the C/H value of HC-urea was relatively high because the high proportion of corn straw promoted the carbonization process.

Table 3 Element content of nitrogen-doped biochar

For activated carbon, the nitrogen content of AC-1:0 increased compared with the value before activation, but the nitrogen element in the sample with an added nitrogen source was lost after activation (Wilmer et al. 2012). This indicates that the nitrogenous functional groups produced by do** were transformed into more stable structures during activation, or they may have reacted with the activator to cause nitrogen loss (Yuan et al. 1 and Table S1. The results showed that both cow manure and urea achieved nitrogen do**, which is consistent with the elemental analysis. Moreover, the existence forms of nitrogen elements after do** with the two nitrogen sources were the same, both of which included pyridinic-N (398.9 eV), pyrrolic-N (400.1 eV), and graphitic-N (401.0 eV) (Shi et al. 2019). The proportion of pyridinic-N doped with cow manure was basically the same and was higher than that of urea do**. This indicates that nitrogen was more likely to form six-membered heterocyclic moieties in proteins during hydrothermal carbonization, while urea nitrogen do** was mainly dominated by five-membered heterocycles. This was because urea do** tended to form small-molecule free C-amino structures, which is consistent with the elemental analysis. In addition, the graphitic-N content of HC-1:1 and HC-1:2 was relatively high, indicating that adding a moderate amount of cow manure promoted the formation of a more stable carbon-nitrogen structure during hydrothermal carbonization. The activation process promoted the conversion of nitrogenous heterocyclic structures such as pyridinic-N and pyrrolic-N to graphitic-N mainly through the conversion of five-membered heterocycles, indicating that this process improved the stability of nitrogenous functional groups. Compared with cow manure, urea-doped hydrothermal biochar showed more pyridinic-N content after activation, indicating that more amino groups produced by urea do** were converted into pyridinic-N and pyrrolic-N during activation. In contrast, do** with cow manure produced fewer amino groups, possibly because the small-molecule free C-amino structure of urea was unstable and easily retained amino groups on the carbon skeleton (Sun et al. 2023a, b).

Fig. 1
figure 1

Relative content of nitrogenous functional group in (a) nitrogen-doped biochar, (b) nitrogen-doped activated carbon

Figure 2 shows the FTIR spectra of nitrogen-doped biochar and activated carbon, which indicates the possible chemical bond distribution of the samples. The peaks at 3200–3600 cm-1 and 2900 cm-1 were attributed to the vibrations of hydroxy (-OH), amine, and amide (N-H) groups, as well as the C-H vibrations of methyl and methylene groups, respectively (Elmouwahidi et al. 2017; Li et al. 2020). The peak at 1586–1745 cm-1 was mainly formed by the vibration of carbon-oxygen double bonds (C=O) and carbon-nitrogen double bonds (C=N) (Zhang et al. 2014). The peaks within the wavenumber range of 900–1200 cm-1 represented carbon-oxygen single bonds (C-O) and carbon-nitrogen single bonds (C-N) (Huang et al. 2022). The FTIR results indicate that both cow manure and urea have achieved effective nitrogen do**, which is consistent with XPS and elemental analysis. The vibration of nitrogen-hydrogen single bonds generated by urea do** was more pronounced than that of cow manure, indicating that urea was more conducive to the retention of amino groups, consistent with the XPS and elemental analysis. In addition, the vibration of carbon-oxygen single bonds in cow manure was more pronounced than in urea, indicating that adding cow manure was conducive to the formation of oxygen-containing functional groups and not conducive to the graphitization of biochar, consistent with the elemental analysis. The vibrational peak induced by the activated carbon-oxygen double bond and carbon-nitrogen double bond was weakened, indicating that the activation process converted unstable chemical bonds into stable ones (Shi et al. 2017).

Fig. 2
figure 2

FTIR spectra of the samples (a) nitrogen-doped biochar, (b) nitrogen-doped activated carbon

3.2 Physical characterization and porous textures

The sample pore characteristics in Table 4 and the N2 adsorption-desorption isotherm in Fig. S3 show that the specific surface area and total pore volume of biochar with added cow manure were positively correlated with the proportion of cow manure. A higher content of cow manure resulted in a lower C/N ratio in the raw material, causing more nitrogenous volatile substances to overflow during the hydrothermal carbonization, thereby promoting pore formation. However, the volume of micropores was basically the same under different levels of cow manure addition because the molecular size of nitrogenous volatile substances was larger than the micropores. The specific surface area and pore volume of HC-urea and HC-1:1 were similar, indicating that the C/N ratio had little effect on the pore volume. This also proves that urea and cow manure underwent the same reaction during hydrothermal carbonization to form free amino groups. Due to the small size of the micropores in biochar, the proportion of micropores was greatly affected by the total pore volume. Raw materials with a higher C/N ratio were not conducive to the formation of pores during hydrothermal carbonization. After KOH activation, the specific surface area and pore volume of biochar significantly increased, indicating that the activation process promoted micropore formation and that KOH played an important role in this process. Except for AC-0:1, the specific surface area of other activated carbons with added cow manure increased with the proportion of cow manure, which was conducive to the reaction between KOH and biochar and the retention of volatile substances. AC-0:1 showed a similar result, mainly due to the poor hydrothermal carbonization effect of cow manure, the more obvious etching effect of KOH, and the difficulty in forming a stable microporous structure (Zhu et al. 2023). Unlike the experimental group with added cow manure, AC-urea did not exhibit a highly porous structure, but its micropore ratio was similar to that of AC-1:1, indicating that more amino groups were retained when urea reacted with KOH. They gradually transformed into stable nitrogenous functional groups, which weakened the etching effect of KOH on the carbon skeleton and inhibited pore formation.

Table 4 Pore structure characteristics of respective samples of biochar and activated carbon

The micropore volume is the most important indicator for judging the CO2 adsorption performance of biochar. Although the specific surface area was positively correlated with the proportion of cow manure, the micropore volume and proportion of activated carbon first increased and then decreased upon increasing the cow manure proportion. The main reason was that the carbonization effect greatly affected the construction process of KOH on micropores, and higher amount of cow manure added had an adverse effect on the carbonization effect. The maximum micropore volume of cow manure-doped activated carbon was 0.165 cm3/g, indicating that a higher nitrogen content promoted the formation of micropores.

The SEM images of the samples are shown in Fig. S4. Hydrothermal carbon exhibited a layered or block-like morphology with no pores on the surface, while activated carbon exhibited a clear, rich, and disordered pore structure. This is consistent with the pore structure analysis. The XRD pattern of the sample is shown in Fig. 3a-b, where there is a broad peak and weak peak at approximately 23° and 43°, respectively (Wohlgemuth et al. 2012). These two peaks were attributed to the reflection peaks of amorphous carbon (002) and (100), indicating that nitrogen-doped biochar had amorphous characteristics similar to the microcrystalline structure characteristics of general biochar materials. This also confirms the SEM observations. In addition, sharp peaks of a crystal phase appeared near 26° and 35°, possibly due to the retention of the ash content in corn straw after carbonization. Due to the slightly acidic environment generated by hydrothermal carbonization, which is conducive to the dissolution of metal ash, the retained ash in biochar is mainly inorganic elements such as silicon, which do not form a stable functional group structure, making it difficult to have a significant impact on the CO2 adsorption process of biochar (Yuan et al. 2012). The CO2 adsorption performance of nitrogen-doped biochar by pre-decoration do** is shown in Table S4. While the biochar synthesized in this research demonstrates promising do** effects, its adsorption capacity appears relatively modest in comparison to prior investigations. This can be attributed primarily to the choice of a lower activation temperature in this study, aimed at emphasizing the mechanism of nitrogen do** while mitigating the impact of the activation process. Consequently, the resultant activated carbons exhibit a suboptimal pore structure.

Fig. 4
figure 4

a CO2 adsorption performance of activated carbon, CO2 adsorption isotherms at (b) 0 ℃ and (c) 25 ℃ for activated carbon

3.4 Potential for nitrogen source substitution

The nitrogen do** of biochar prepared with cow manure as the nitrogen source first increased and then decreased upon increasing the proportion of cow manure in the raw material. The highest nitrogen element and structural nitrogen content of biochar was achieved when the mass ratio of corn straw and cow manure was 1:1. In addition, changes in the micropore volume and percentage of nitrogen-doped activated carbon were similar to that of the nitrogen content, where a better micropore volume and percentage of biochar were observed when the mass ratio of corn straw to cow manure was 1:1. Such changes in functional groups and pore characteristics directly led to the optimal CO2 adsorption effect of AC-1:1. The main reason was that due to the simultaneous occurrence of carbonization and do**, the degree of carbonization had a greater impact on the do** effect. A higher percentage of cow manure led to a lower content of wood fiber, which had a lower degree of carbonization, and to a certain extent adversely affected the nitrogen do** (Zhao et al. 2022). Moreover, a lower amount of added cow manure resulted in a high carbon-to-nitrogen ratio in the feedstock, which was unfavorable for nitrogen do** in the biochar. The nitrogen-doped biochar was prepared by changing the nitrogen source to urea, whose raw material’s C/N ratio was the same as that of the experimental group with the optimal do** effect and CO2 adsorption performance. The do** effect of urea was worse compared with that of cow manure, indicating that the nitrogen in cow manure was more likely to form a stable structure that prevented nitrogen loss. Due to the lower nitrogen content in the biochar prepared with urea as the nitrogen source, the activation process also had a worse effect on the pore structure, which directly affected the physical adsorption of CO2. The CO2 adsorption results also supported the previous conclusion, where a poorer do** effect and pore structure directly led to lower CO2 adsorption (Han et al. 5 shows the do** mechanism during carbonization when using different nitrogen sources. Nitrogen do** mainly involves two processes: bond-breaking decomposition and polymerization do**. During bond-breaking decomposition, chemical bonds in the raw material were broken to form free nitrogenous species that participate in subsequent reactions (Başer et al. 2021). The process of polymerization do** mainly includes three stages. First, free nitrogenous species react with the carbon skeleton to form C-N bonds, where nitrogen mainly exists as amino groups and a small amount of structural nitrogen. The second stage is the nitrogen cyclization process, where nitrogen is transformed from amino to nitrogenous heterocycles such as pyridinic-N and pyrrolic-N, and the stability of nitrogenous functional groups is improved. The third stage (graphitization) further improves the stability of nitrogenous functional groups, and nitrogenous heterocycles gradually transform into graphitic-N. Due to the low intensity of the hydrothermal carbonization reaction and its simultaneous occurrence with do**, the do** reaction mainly occurred in the first two stages, while the third stage was more likely to occur during the post-treatment activation process (Lu et al. 2022). Protein nitrogen sources in cow manure mainly undergo two pathways during do**. One is to retain structural nitrogen in the carbon skeleton to form relatively stable nitrogenous functional groups, and the other is to undergo carbon-nitrogen bond cleavage to form free amino groups for do**, which is the main do** pathway (Dai et al. 2015). As a representative nitrogen source for small-molecule and amino-rich organic compounds, urea mainly dopes via bond-breaking decomposition to form free amino or free C-amino structures, both of which help retain amino groups in the carbon skeleton, which is consistent with previous results. Therefore, the selection of nitrogen sources should consider the form of nitrogen and the do** process. Small-molecule and amino-rich nitrogen sources help retain amino groups, while macromolecular protein nitrogen sources promote the formation of structural nitrogen in biochar. Significantly, the selection of simultaneous carbonization-do** must also consider the adverse effects of protein nitrogen sources on the carbonization process. Nitrogen-doped carbon materials applied for CO2 adsorption can be prepared through post-decoration do** using protein nitrogen sources, which promotes the direct incorporation of structural nitrogen functional groups and the retention of pores.

Fig. 5
figure 5

Mechanism of carbonization do** with different nitrogen sources

4 Conclusions

This study investigated the nitrogen source potential and do** mechanism of cow manure, and the CO2 adsorption performance of the resulting nitrogen-doped biochar. Although different nitrogen sources showed different do** mechanisms, the forms of doped nitrogen in biochar were basically similar. Under the same carbon-to-nitrogen ratio, biochar prepared from cow manure as the nitrogen source had a better do** effect and CO2 adsorption performance, with a CO2 adsorption of up to 3.45 mmol/g. In addition, the do** effect was influenced by both the nitrogen content in the raw material and the process selection. A low or high proportion of cow manure in the raw materials did not promote do**. When the mass ratio of corn straw and cow manure was 1:1, the nitrogen do** effect was the best, and the nitrogen content of biochar reached 2.53 wt.%. Macromolecular protein nitrogen sources represented by cow manure tended to retain structural nitrogen after do**, while small-molecule and amino-rich nitrogen sources represented by urea tended to retain amino groups. This study provides new ideas and theoretical support for preparing high-performance nitrogen-doped carbon materials. To achieve the optimal do** effect for specific applications, the do** reaction mechanisms of different nitrogen sources and appropriate preparation processes should be considered to prepare nitrogen-doped biochar.