The activity of photocatalysts depends, to a large extent, on the separation of internal charge carriers, thereby enhancing the redox ability. S-scheme photocatalysts have shown good hydrogen production performance, not only with good performance, but also with high reproducibility. In particular, 2D/2D S-scheme heterojunction materials have attracted great attention because of the rapid charge separation and transfer rate between the interfaces. In this work, porous g-C3N4/CdS-diethylenetriamine (PCN/CS-D) S-scheme heterojunction is designed and fabricated by a facile microwave method. The designed PCN/CS-D photocatalyst has a hydrogen evolution rate of 12547 μmolg-1h-1, which is 15.6 and 2.4 times as high as that of PCN(806 μmolg-1h-1) and CS-D (5209 μmolg-1h-1), respectively. The combination of PCN and CS-D improves the separation of electron-hole pairs and the rate of charge transfer.