Organic small molecular-assisted water splitting technology is an efficient and promising technology for hydrogen production, which can meet the needs of obtaining hydrogen energy and protecting the environment. Constructing heterojunctions to enhance the interfacial electron transfer and achieve bifunctionality represents a viable strategy for enhancing the performance of electrocatalysts. In this work, the hollow structure Co3S4/NiS2 p-p heterojunction catalyst has been successfully synthesized by one-step hydrothermal method. Only −0.184, 1.64, 1.44 and 1.56 V vs. RHE are required to drive 50 mA cm−2 for hydrogen evolution reaction (HER), oxygen evolution reaction (OER), urea oxidation reaction (UOR), oxygen evolution reaction in lactic acid solution (OER-LA), respectively. For two-electrode electrolytic process, the cell voltages only need 1.72 V, 1.51 V and 1.61 V to drive 50 mA cm−2 in 1 M KOH, 1 M KOH containing 0.5 M urea and 1 M KOH containing 0.5 M lactic acid electrolytes, and it operates continuously at 50 mA cm−2 for 200 h test without significant decay of activity in 1 M KOH containing 0.5 M lactic acid, showing excellent durability. Density functional theory (DFT) calculation reveals that the p-p heterojunction between Co3S4 and NiS2 facilitates the electron redistribution at interfaces, thereby promoting the electron migration. This work presents a strategic approach for fabricating advanced bifunctional electrocatalysts by employing metal sulfides to form heterojunction, thereby achieving enhanced electrocatalytic activities in both hydrogen production and organic molecule decontamination.