Regulating bulk polymeric carbon nitride (PCN) into nanostructured PCN has long been proven effective in enhancing its photocatalytic activity. However, simplifying the synthesis of nanostructured PCN remains a considerable challenge and has drawn widespread attention. This work reported the one-step green and sustainable synthesis of nanostructured PCN in the direct thermal polymerization of the guanidine thiocyanate precursor via the judicious introduction of hot water vapor’s dual function as gas-bubble templates along with a green etching reagent. By optimizing the temperature of the water vapor and polymerization reaction time, the as-prepared nanostructured PCN exhibited a highly boosted visible-light-driven photocatalytic hydrogen evolution activity. The highest H2evolution rate achieved was 4.81mmol∙g−1∙h−1, which is over four times larger than that of the bulk PCN (1.19 mmol∙g−1∙h−1) prepared only by thermal polymerization of the guanidine thiocyanate precursor without the assistance of bifunctional hot water vapor. The enhanced photocatalytic activity might be attributed to the enlarged BET specific surface area, increased active site quantity, and highly accelerated photo-excited charge-carrier transfer and separation. Moreover, the sustainability of this environmentally friendly hot water vapor dual-function mediated method was also shown to be versatile in preparing other nanostructured PCN photocatalysts derived from other precursors such as dicyandiamide and melamine. This work is expected to provide a novel pathway for exploring the rational design of nanostructured PCN for highly efficient solar energy conversion.