Abstract The design and synthesis of efficient metal‐free photoelectrocatalysts for water splitting are of great significance, as nonmetal elements are generally earth abundant and environment friendly. As a typical metal‐free semiconductor, g‐C3N4 has received much attention in the field of photocatalytic water splitting. However, the poor photoinduced hole mobility of g‐C 3 N 4 restrains its catalytic performance. Herein, for the first time, graphdiyne (GDY) is used to interact with g‐C 3 N 4 to construct a metal‐free 2D/2D heterojunction of g‐C 3 N 4 /GDY as an efficient photoelectrocatalyst for water splitting. The g‐C 3 N 4 /GDY photocathode exhibits enhanced photocarriers separation due to excellent hole transfer nature of graphdiyne and the structure of 2D/2D heterojunction of g‐C 3 N 4 /GDY, realizing a sevenfold increase in electron life time (610 μs) compared to that of g‐C 3 N 4 (88 μs), and a threefold increase in photocurrent density (−98 μA cm −2 ) compared to that of g‐C 3 N 4 photocathode (−32 μA cm −2 ) at a potential of 0 V versus normal hydrogen electrode (NHE) in neutral aqueous solution. The photoelectrocatalytic performance can be further improved by fabricating Pt@g‐C 3 N 4 /GDY, which displays an photocurrent of −133 μA cm −2 at a potential of 0 V versus NHE in neutral aqueous solution. This work provides a new strategy for the design of efficient metal‐free photoelectrocatalysts for water splitting.