## 3 Results and Discussion
To further analyze the types and states of surface elements on the porous carbon nanofibers with different nitrogen contents, CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N were tested by XPS. The full spectra in Figure 6a show that the prepared carbon nanofibers with different nitrogen contents contained three elements: C, N, and O; the corresponding three orbits, C\({}_{18}\), N\({}_{18}\), and O\({}_{18}\), were located at 285, 400, and 533 eV, respectively. The C/N atomic ratios of CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N were 5.8%, 6.6%, 8.4%, and 9.9%, respectively, obtained by XPS data analysis. The C/N atomic ratios of all samples were higher than those of CNFs-30 NH\({}_{3}\), indicating that the amount of nitrogen was effectively increased by adding melamine during preparation. Figure 6b-e show the N\({}_{18}\) spectra of  
Figure 4: (**a**) Cycle performance curves and (**b**) rate performance curves of CNFs-0 NH\({}_{3}\), CNFs-10 NH\({}_{3}\), CNFs-20 NH\({}_{3}\), CNFs-30 NH\({}_{3}\), and CNFs-40 NH\({}_{3}\) anodes. The digital picture in (**a**) is the anode sheet activated by ammonia. CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N. All samples have two peaks of pyridinic nitrogen (N-6) at 398.5 eV and pyrrolic/pyridone nitrogen (N-5) at 400.1 eV. These results explain that nitrogen was effectively doped into CNFs-30 NH\({}_{3}\), and the chemical bond formed by doping melamine is consistent with that formed by ammonia activation. Figure 5: SEM images of porous carbon nanofibers with different nitrogen doping contents: (**a**) CNFs-0N, (**b**) CNFs-1N, (**c**) CNFs-2N, and (**d**) CNFs-3N. (**e**) SEM image and the corresponding EDS mapping of C and N elements in partial CNFs-2N. (**f**) Nitrogen adsorption–desorption curves and (**g**) pore size distribution curves of CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N. Figure 6: XPS spectra of porous carbon nanofibers with different nitrogen contents: (**a**) Full spectra of CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N. Spectra of N\({}_{18}\): (**b**) CNFs-0N, (**c**) CNFs-1N, (**d**) CNFs-2N, and (**e**) CNFs-3N. Figure 7a show the cycle performance curves of the CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N anodes at 50 mA g\({}^{-1}\) from 0.01 to 3 V in lithium-ion batteries. After 100 cycles, the reversible capacity of each anode changed little. In particular, the CNFs-2N anode had a high initial capacity of 1108.9 mAh g\({}^{-1}\) and still maintained a high reversible capacity of 954.3 mAh g\({}^{-1}\) after 100 cycles, which was the highest capacity among the four anodes. However, the initial Coulombic efficiency of the CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N anodes was only 49.72%, 50.24%, 46.29%, and 45.71%, respectively. The low initial Coulombic efficiency is due to the fact that after ammonia activation, the materials developed a number of micropores, mesopores, and macroporous structures, providing many reactive sites and forming a high irreversible capacity with the formation of a large area of SEI film during the first charge and discharge process. After the first charge and discharge, the Coulomb efficiency of each anode was stable at basically more than 90%, which is attributed to the formation of stable SEI film. Figure 7b show the rate performance curves of the CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N anodes in lithium-ion batteries at different current densities. The CNFs-2N anode still exhibited excellent specific capacities of 1047.2, 796.9, 709.6, 619.9, and 558.3 mAh g\({}^{-1}\) at 50, 100, 200, 500, and 1000 mA g\({}^{-1}\), respectively. When the current density changed to  
Figure 7: **(a)** Cycle performance curves and **(b)** rate performance curves of CNFs-0N, CNFs-1N, CNFs-2N, and CNFs-3N anodes. **(c)** The charge–discharge curves of the CNFs-2N anode, **(d)** CV curves of the CNFs-2N anode, and **(e)** Nyquist plots of CNFs-0N and CNFs-2N anodes in lithium-ion batteries. The insertion diagram in **(e)** is the equivalent circuit.