Efficiently eliminating of highly toxic ultra-dilute lead ions (Pb2+) from wastewater is a challenging task. Capacitive deionization (CDI) technology, based on the electrochemical capacitance mechanism, has emerged as a pivotal approach to address this challenge. In this work, a KNO3-mediated molten salt-coupled activation strategy was proposed to prepare nitrogen-doped hierarchical porous biomass carbon electrode material (3DCF-650-0.2) with a three-dimensional carbon skeleton, which was integrated into a symmetrical CDI device for Pb2+ removal. The 3DCF-650-0.2 electrode exhibited a high specific capacitance of 330.3 F g-1 at a current density of 1 A g-1, with a capacity retention rate of 98.45% after 10,000 cycles at 10 A g-1. Furthermore, the electrochemical adsorption capacity of the CDI device for Pb2+ reached 72.86 mg g-1 (1.2 V, 50 mg L-1), and the CDI device retained a high adsorption capacity of 91.14% after twenty adsorption/desorption cycles. These excellent adsorption properties are attributed to the in-situ activation and gas foaming of KNO3, which favors the production of reasonable pore structure (electric double-layer capacitance) and an appropriate pyrrolic nitrogen doping amount (selective adsorption) in the carbon materials. This work provides insight into the mechanism of the molten salt-coupled activation strategy, offering new ideas for the targeted design of high-performance CDI biomass carbon materials.