Polymeric carbon nitride (PCN), as a metal-free photocatalyst, has drawn wide attention in the photocatalytic H2 evolution. However, the photocatalytic activity of directly synthesized PCN is limited by its low crystallinity. Currently, regulating the melon-based PCN into tri-s-triazine-based crystalline PCN to further optimize its structure has been proved to effectively improve its photocatalytic activity. The heptazine-based crystalline carbon nitride, potassium poly(heptazine imide) (abbreviated as K-PHI), has been used in photocatalytic H2 evolution benefiting from its high crystallinity, as the high crystallinity narrows the bandgap and increases the light capture efficiency and increases the charge mobility. Nevertheless, the effect of synthesis temperature on crystallinity has not yet been reported. In this work, the effect of temperature on the crystallinity of heptazine-based crystalline carbon nitride was studied by one-step synthesis at different temperatures. It shows that the heptazine-based crystalline structure appears when the temperature exceeds 540°C. Additionally, the crystallinity of all samples is gradually improved with increasing temperature until the sample begins to decompose beyond 630°C. The sample synthesized at 630°C demonstrates the highest photocatalytic H2 evolution rate of 1.798 mmol h−1 g−1 under visible light irradiation, which is 31.5 times that of bulk PCN. Based on systematic material characterizations, the mechanism of the effect of synthesis temperature on crystallinity and the contribution of crystallinity to photocatalytic efficiency were revealed.