The preparation of carbon materials by doping bimetallic oxides into triazine frameworks (COFs) is a promising electrocatalyst with the potential to replace precious metals in energy storage systems. In this experiment, a covalent triazine framework (COF) was synthesized by 1,4-dicyanobenzene (DCB) and zinc chloride, in which the COF and transition metals were used as carbon, nitrogen, cobalt, and iron sources. According to the properties of this COF, the destruction of the catalyst during pyrolysis can be prevented. The enhanced catalytic performance of the catalysts can be seen by testing all of the samples of catalysts in an alkaline medium. The high half-wave potential (E 1/2 ) of 0.86 V is comparable to Pt/C and also shows excellent durability by testing. Zinc-air batteries were assembled using the prepared catalysts, and the batteries were tested for specific capacity (548 mAh g −1 ) and power density (189 mW cm −2 ). This work provides a new direction for COF-derived catalysts for carbon materials.