Electrocatalytic oxygen reduction has attracted widespread attention because it enables in situ production of hydrogen peroxide with low energy consumption and no secondary pollution. However, it remains challenging to design efficient and highly stable oxygen reduction electrocatalysts. In this study, sulphur-doped multi-walled carbon nanotubes (S-CNTs) were prepared as electrocatalysts by impregnating carbon nanotubes (CNTs) with sulphur-containing organic molecules, followed by high-temperature pyrolysis. The obtained S-CNTs were employed as a cathode material for the electrocatalytic production of hydrogen peroxide. After optimising the working parameters in a homemade undivided cell, the accumulated concentration of hydrogen peroxide at the S-CNT cathode reached 382.13 mg/L, and the stable hydrogen peroxide generation capability was achieved over a wide pH range. The impact of the cathode components on the electrocatalytic activity was studied. The results indicate that sulphur doping increases the number of sulphur-containing functional groups, which enhance the electrocatalytic activity and selectivity for two-electron oxygen reduction. Moreover, the S-CNT cathode remained stable after recycling 20 times at 30 mA/cm2, demonstrating its great applicability for the preparation of hydrogen peroxide. This study provides valuable insights into the rational design of carbon electrodes for the electrosynthesis of hydrogen peroxide.