Developing efficient metal-free catalysts to achieve electrochemical synthesis of hydrogen peroxide (H2O2) is crucial for substituting traditional energy-intensive anthraquinone process. Heteroatom-doped carbon materials have shown great potential toward 2e-pathway for catalyzing oxygen reduction to hydrogen peroxide (ORHP). However, conventional nanocarbon electrocatalysts show slow kinetics toward ORHP due to the weak binding strength with OOH* intermediate, resulting reduction of O2 to H2O. Here, sulfur and nitrogen dual-doped graphene (SNC) electrocatalyst consisting of S-C-N-C functional group are synthesized through hydrothermal self-assembly and nitridation processes with thiourea as sulfur source. In S-C-N-C functional group, pentagon-S and pyrrolic-N are covalently grafted onto the edge of graphene and produce marginal carbon ring defects, which provide highly active sites for catalyzing ORHP. The obtained SNC catalysts deliver an outstanding ORHP activity and selectivity for H2O2 production, while retaining remarkable stability. The experimental and computational results reveal that marginal S-C-N-C functional groups afford an appropriate adsorption strength with OOH* intermediate and a low reaction barrier as well, which are essential for the activity of ORHP.