It is highly attractive to develop a photoelectrochemical (PEC) sensing platform based on a non-noble-metal nano array architecture. In this paper, a PEC hydrogen peroxide (H2O2) biosensor based on Ni/WS2/WC heterostructures was synthesized by a facile hydrothermal synthesis method and melamine carbonization process. The morphology, structural and composition and light absorption properties of the Ni/WS2/WC catalyst were investigated by scanning electron microscopy (SEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS) and UV–visible spectrophotometer. The average size of the Ni/WS2/WC nanosheets was about 200 nm. Additionally, the electrochemical properties toward H2O2 were studied using an electrochemical workstation. Benefiting from the Ni and C atoms, the optimized Ni/WS2/WC catalyst showed superior H2O2 sensing performance and a large photocurrent response. It was found that the detection sensitivity of the Ni/WS2/WC catalyst was 25.7 μA/cm2/mM, and the detection limit was 0.3 mmol/L in the linear range of 1−10 mM. Simultaneously, the synthesized Ni/WS2/WC electrode displayed excellent electrocatalytic properties in hydrogen evolution reaction (HER), with a relatively small overpotential of 126 mV at 10 mA/cm2 in 0.5 M H2SO4. This novel Ni/WS2/WC electrode may provide new insights into preparing other efficient hybrid photoelectrodes for PEC applications.