The development of highly efficient and stable inexpensive catalysts for the reduction of 4-nitrophenol (4-NP) to 4-aminophenol (4-AP) by NaBH4 in an aqueous solution by utilizing metal-organic frameworks (MOFs) as precursor and template remains a hot topic. Herein, a simple self-template strategy was developed to synthesize a porous nitrogen-doped carbon frameworks embedded with zinc and cobalt nanoparticles (Zn0.3Co2.7@NC) catalyst by thermal annealing of the bimetallic zinc-cobalt zeolitic imidazolate framework (Zn0.3Co2.7-ZIF) as an effective precursor and template. The resulting Zn0.3Co2.7@NC catalysts show an excellent catalytic activity for the reduction of 4-NP and the reduction reaction was completed only in 5 min with nearly 100% conversion. The apparent rate constant for the reaction of 4-NP reduction was estimated to be 0.683 min−1. Moreover, the catalyst was extended to reduce other nitro compounds and exhibited excellent catalytic activity. When compared to other related catalysts in the literature, the catalytic activity of catalyst is superior. Therefore, the resulting Zn0.3Co2.7@NC is expected to get more extensive application in the field of catalysis.