Zeolitic imidazolate framework-8 (ZIF-8)-derived N-doped graphene analogous polyhedrons (ZNGs) obtained via the direct carbonation of ZIF-8 are applied to photocatalytic hydrogen evolution for the first time. The contents of different types of nitrogen atoms in ZNGs can be fine-tuned via the calcination temperature, which significantly influences the hydrogen evolution rate of the ZNGs.