Heterostructure construction and heteroatom doping are powerful strategies for enhancing the electrolytic efficiency of electrocatalysts for overall water splitting. Herein, we present a P-doped MoS2/Ni3S2electrocatalyst on nickel foam (NF) prepared using a one-step hydrothermal method. The optimized P[0.9mM]-MoS2/Ni3S2@NF exhibits a cluster nanoflower-like morphology, which promotes the synergistic electrocatalytic effect of the heterostructures with abundant active centers, resulting in high catalytic activity for the hydrogen evolution reaction (HER) and oxygen evolution reaction (OER) in alkaline electrolyte. The electrode exhibits low overpotentials and Tafel slopes for the HER and OER. In addition, the catalyst electrode used in a two-electrode system for overall water splitting requires an ultralow voltage of 1.42 V at 10 mA·cm−2and shows no obvious increase in current within 35 h, indicating excellent stability. Therefore, the combination of P doping and the heterostructure suggests a novel path to formulate high-performance electrocatalysts for overall water splitting.