By annealing an Fe(III)-coordination compound (Fe-CC), [FeCl3(Hbta)2] (Hbta = benzotriazole) in the presence of a CNT template, an Fe4N/Fe3N/Fe/CNT heterostructure was successfully synthesized without extra nitrogen source. The decomposition of the Hbta in Fe-CC under high temperature annealing can produce carbon sheets and graphene, and the presence of CNT can alleviate the stacking of the in-situ generated carbon materials. Meanwhile, iron nitride nanoparticles (NPs) can be anchored on the carbon sheets, and the anchoring effect efficiently prevents the agglomeration of NPs and increases the amount of active catalytic sites for the oxygen evolution reaction (OER). Fe4N/Fe3N/Fe/CNT shows an excellent OER activity with a Tafel slope of 63 mV dec-1 as well as overpotentials of 121 (η10) and 275 mV (η100) at 10 and 100 mA cm-2, respectively, far exceeding commercial RuO2 and other catalysts. Density functional theory (DFT) calculations disclose that the excellent OER performance of Fe4N/Fe3N/Fe/CNT is associated with the Fe4N/Fe3N heterojunction, which can improve the electron conductivity and boost the electron transfer from N to Fe. The Fe4N/Fe3N/Fe/CNT catalyst exhibits long-term OER activity during 100 h of electrolysis at 20 mA cm-2. This is related to the dual coatings of the in-situ generated ultrathin carbon shell and few-layered graphene on the surface of the iron nitride NP, which can protect the fast leaching of iron nitride during the OER process. Furthermore, it was investigated the effects of the annealing temperature, the CNT template and the heating rate on the calcined products.