We report efficient and simultaneous production of H2 and H2O2 from photocatalytic pure water splitting over a novel heterojunction photocatalyst made of red phosphorus (RP) and CoxP co-modified P-doped g-C3N4 (PCN). The success relies on the formation of RP as an intermediate to link CoxP and PCN, introducing atomic-level homogeneous P-P/P-P bonds in the heterojunction. The crafted P-P/P-P bridges as unique channels enable controllable and smooth charge flow via strong electronic coupling between each component in the composite photocatalyst, endowing a boosted carrier kinetics. More significantly, RP also facilities a Z-scheme charge transfer that induces two-electron photocatalytic H2 and H2O2 production from pure water in 1:1 stoichiometry. The highest activity reaches 15.26 μmol h−1 for bifunctional chemical evolution under simulated solar light irradiation, with the apparent quantum efficiencies (AQE) of 6.2 % at 366 nm and 3.6 % at 425 nm, without using any noble metals on 50 mg of photocatalyst. The new insights of phosphorus bridges can be applied to other composite photocatalysts for reinforced reaction kinetics towards value-added chemicals generation.