For the 2D metal-free carbon catalysts, the atomic coplanar architecture enables a large number of pzorbitals tooverlap laterally,thus formingπ-electron delocalization, and the delocalization degree of the central atom dominates the catalytic activity. Herein, designing sulfur-doped defect-rich graphitic carbon nitride (S-Nv-C3N4) materials as a model, we proposea strategy to promote localized electronpolarization by enhancing the ferromagnetism of ultra-thin 2D carbon nitride nanosheets.The introduction of sulfur (S)further promotes localized ferromagnetic coupling,thereby inducing long-range ferromagnetic ordering and accelerating the electron interface transport. Meanwhile, the hybridization of sulfur atoms breaks the symmetry and integrity of the unit structure, promoteselectron enrichment and stimulating electron delocalization at the active site. This optimization enhances the *OOH desorption, providing a favorable kinetic pathway for the production of hydrogen peroxide (H2O2). Consequently, S-Nv-C3N4exhibits high selectivity (>95%)and achieves a superb H2O2production rate,approaching4374.8ppm duringcontinuous electrolysisover 300-hour. According to theoreticalcalculationand in-situspectroscopy,the ortho-S configurationcan provide ferromagnetic perturbation incarbon active centers, leading to the electron delocalization, which optimizes the OOH* adsorption during the catalytic process.