Photocatalytic hydrogen production is an effective strategy for addressing energy shortage and converting solar energy into chemical energy. Exploring effective strategies to improve photocatalytic H2 production is a key challenge in the field of energy conversion. There are numerous oxygen vacancies on the surface of non-stoichiometric W18O49 (WO), which result in suitable light absorption performance, but the hydrogen evolution effect is not ideal because the band potential does not reach the hydrogen evolution potential. A suitable heterojunction is constructed to optimize defects such as high carrier recombination rate and low photocatalytic performance in a semiconductor. Herein, 2D porous carbon nitride (PCN) is synthesized, followed by the in situ growth of 1D WO on the PCN to realize a step-scheme (S-scheme) heterojunction. When WO and PCN are composited, the difference between the Fermi levels of WO and PCN leads to electron migration, which balances the Fermi levels of WO and PCN. Electron transfer leads to the formation of an interfacial electric field and bends the energy bands of WO and PCN, thereby resulting in the recombination of unused electrons and holes while leaving used electrons and holes, which can accelerate the separation and charge transfer at the interface and endow the WO/PCN system with better redox capabilities. In addition, PCN with a porous structure provides more catalytic active sites. The photocatalytic performance of the sample can be investigated using the amount of hydrogen released. Compared to WO and PCN, 20%WO/PCN composite has a higher H2 production rate (1700 µmol•g −1 •h −1 ), which is 56 times greater than that of PCN (30 µmol•g −1 •h −1 ). This study shows the possibility of the application of S-scheme heterojunction in the field of photocatalytic H2 production.