Development of efficient and stable electrodes for hydrogen and oxygen evolution from water constituted of abundant elements and prepared by sustainable and scalable procedures is of considerable importance for producing green hydrogen from renewable electricity. Herein, a method for the preparation of Ni 2 P, Fe 2 P, and FeP supported on N-doped graphene (NiP/NG and FeP/NG) is reported. The procedure uses metal salts, phosphorous oxide, and chitosan as precursors of metal phosphide and N-doped graphene, avoiding the use of undesirable and hazardous precursors, such as PH 3 or NaH 2 PO 2 , and rendering a material with a strong metal phosphide-graphene interaction. Moreover, NiP/NG and FeP/NG electrodes are demonstrated to be more efficient than the benchmark catalysts Pt/C and RuO 2 , for hydrogen evolution reaction and oxygen evolution reaction, respectively, at a large current density (300 mA/cm 2 ). In addition, water electrolysis was carried out using NiP/NG//FeP/NG electrodes, also demonstrating improved efficiency and stability compared with Pt/C//RuO 2 at a current density (400 mA/cm 2 ) near industrial requirements. • Synthetic procedure for preparing metal phosphides avoiding the use of toxic reagents • The method creates a strong interaction between metal phosphides and the support • Ni 2 P and Fe x P on N-doped graphene electrodes have been prepared for water electrolysis • These can operate at 400 mA/cm 2 for 50 h Transition metal phosphides are promising catalysts for water electrolysis but are commonly prepared using hazardous phosphines. Here Hu et al. prepare electrodes consisting of metal phosphide nanoparticles supported on porous 3D graphene, avoiding the use of hazardous precursors, catalyzing water electrolysis at high current density near industrial requirements.