Graphdiyne, a member of the carbon family, has unique physical and chemical properties due to its structural advantages and has been applied in many fields. Recently, it has shown high research value in the direction of photocatalysis hydrogen separation. Herein, we report a type of two-dimensional pyrenyl graphdiyne (Pyr-GDY) using 1,3,6,8-tetrabromopyrene and CaC 2 as reaction substrates for the first time by means of mechanical ball-milling and constructed an S-scheme heterojunction with CdS to achieve spatial separation of an electron− hole, and coupled CeO 2 as a cocatalyst to effectively retard the photocorrosion of CdS. The hydrogen evolution rate of the ternary composite catalyst CdS/Pyr-GDY-CeO 2 -15% (CPGC-15%) in a lactic acid solution is 21.16 mmol g −1 h −1 , which is 7.6 times that of pure CdS and 998.1 times that of pure Pyr-GDY. The successful construction of an S-scheme heterojunction between CdS and Pyr-GDY is verified by in situ XPS analysis. The introduction of Pyr-GDY enhances the absorbance of materials in the near-infrared spectrum, which is beneficial for CPGC-15% to absorb photons. Furthermore, CPGC-15% has low resistance and strong photoelectric response ability, which is beneficial for preventing the recombination of electron−hole pairs. This work provides a method for the preparation of Pyr-GDY and shows a bright prospect in the field of photocatalysis hydrogen separation.