Efficient capacitive deionization (CDI) technology puts forward higher requirements for electrode materials. However, the traditional process of preparing porous carbon (PC) electrodes by alkaline chemical activation is polluting and energy-consuming. In this work, the N/P co-doped biocarbon material (H-AL/APP) was prepared by using alkali lignin (AL) and ammonium polyphosphate (APP) as carbon precursors based on laser-induced carbonization and hydrothermal activation technology. The as-prepared carbon material shows a three-dimensional (3D) structure with a hierarchical porous structure, large specific surface area of 405.98 m2/g (SSA), excellent pore volume, and outstanding mesoporosity. Compared with commercial YP80 activated carbon, The H-AL/APP electrode exhibits a higher specific capacitance of 210F/g with excellent rate performance and cycle stability. When assembled for desalination, H-AL/APP shows the highest removal rate of 23 mg/g/min with an outstanding desalination capacity of 34.6 mg/g than those of YP80 activated carbon. Furthermore, reasonable cycle stability and reproducibility highlight their promising application prospects. In summary, this work provides a green, efficient, and economical method for preparing high-performance heteroatom-doped PCs for efficient CDI desalination.