• Nitrogen-doped activated carbon (NAC) enhances capacitive deionization performance and cyclic stability compared to pristine activated carbon.
• Electro-oxidation of anode carbon materials generates carboxyl groups that shift the anode zero-charge potential, leading to uneven potential distribution and reduced adsorption capacity.
• The enhanced cyclic stability of NAC is attributed to increased electron density on carbon atoms adjacent to quaternary-N and pyridinic-oxide-N, which mitigates oxidative degradation.
• The study provides mechanistic insights into performance decay in CDI and offers a strategy for designing durable electrode materials.