In this work, we exploited zeolitic imidazolate framework ZIF-67 as a sacrificial precursor to prepare Co nanoparticles supported on nanoporous nitrogen-doped carbon. The catalysts were tested for hydrolytic dehydrogenation of ammonia borane and the size of the Co nanoparticles and the structural features of the carbon support were shown to have a large effect on the catalytic activity. Furthermore, we investigated the effect of adding Zn to the catalyst precursor (ZIF-67/8). The highest catalytic activity was obtained for ZIF-67/8 with a molar ratio of Co/Zn = 1, which was carbonized at 900 °C to remove Zn by evaporation. At room temperature, this catalyst resulted in a turnover frequency of 7.6 mol H2 per mol Co min−1 and an apparent activation energy of Ea = 44.9 kJ mol−1. The turnover frequency was further increased to 12.7 min−1 in 0.1 M NaOH.