Electrocatalytic in-situ production of hydrogen peroxide (H2O2) has attracted continuous attention due to its advantages of cleanliness and safety. However, this method is difficult to meet the requirements of high activity and excellent reusability, which limits its wide application. In this work, cheap pitch was used as carbon source and Co(NO3)2 was used as catalyst precursor to convert its products into carbon nanotubes (CNTs) with high aspect ratio through catalytic pyrolysis. Subsequently, anthraquinone was used to covalently modify CNTs as electrocatalytic electrodes. The experimental results showed that CNTs covalently modified by anthraquinone significantly increased the activity of H2O2 production. The results showed that the improved activity of the optimal electrode was due to the increase of the initial potential of oxygen reduction and the ultimate current density.