One of the present great challenges is finding nonprecious materials characterized by efficient electrocatalytic behavior in order to substitute the expensive platinum-based materials for the purpose of hydrogen evolution reactions (HERs). In this study, ZIF-67 and ZIF-67 were used as precursors in order to fabricate metallic-doped N-enriched carbon successfully through a simple process of pyrolysis for applying the hydrogen evolution reaction. In addition, nickel was added to these structures in the course of the synthesis procedure. While under high-temperature treatment, Nickel doped ZIF-67 was transformed into metallic NiCo doped N enriched carbon (NiCo/NC), under high-temperature treatments, Ni-doped ZIF-8 changed into metallic NiZn doped N enriched carbon (NiZn/NC). By combining metallic precursors, the following five structures were synthesized: NiCo/NC, Co/NC, NiZn/NC, NiCoZn/NC, as well as CoZn/NC. It is noteworthy that the produced Co/NC shows optimum hydrogen evolution reaction activity along with superior overpotential of 97 mV and the minimum Tafel slope of 60 mV/dec at 10 mA cm. In addition, the superb behavior of hydrogen evolution reaction can be attributable to the numerous active sites, the superior electrical conductivity of carbon, and the firm structure. As a result, the present paper suggests a novel strategy in order to produce nonprecious materials characterized by superb HER efficiency for future scholars.