Abstract The flake biochar electrode materials with fast ion transport function were prepared by KOH activation walnut shell used as raw material. The effects of carbonization temperature and KOH-to-biochar ratio were systematically evaluated using physicochemical characterization and electrochemical performance testing. The optimized walnut shell biochar (WSC800-2), produced at 800℃ with a KOH-to-biochar ration of 2∶1, exhibited an exceptional specific surface area (2,287 m2 g-1), the highest porosity (0.824 cm3 g-1), and an excellent specific capacitance (369.51 F g-1, 10 mV s-1). Furthermore, in desalination experiments, WSC800-2 achieved a high salt adsorption capacity of 15.70 mg g-1 at 1.2V, 500 mg L-1 NaCl solution. The electrode also exhibited outstanding cycling stability, retaining 97.0% of its performance after 10 adsorption/desorption cycles. These findings highlight the potential of walnut shell-derived biochar as an effective material for capacitive deionization and future desalination technologies.