Nickel-iron (Ni-Fe) rechargeable batteries are attractive as sustainable solutions for large-scale electrical energy storage because of their low cost, eco-friendliness and safety, but their iron anodes always suffer from low capacity and poor stability, which greatly limits their wide applications. We present here a molecular confinement strategy to fabricate ultrasmall iron oxide nanocrystals firmly mounted on carbon (mc-FeOx/C) that works as stable anode material for high energy density Ni-Fe batteries. Compared with conventional iron oxide on carbon synthesized without molecular confinement (FeOx/C), the mc-FeOx/C exhibits a much higher capacity (370.2 vs 159.5mAhg−1 at a current density of 2Ag−1) and better stability (capacity retention of 93.5% vs 61.2% after 1000 charge/discharge cycles). When to further combine with a nickel cathode, the mc-FeOx/C based Ni-Fe battery delivers an energy density up to 173.7Whkg−1, among the highest value for Ni-Fe batteries reported so far. The mc-FeOx/C based Ni-Fe battery also offers excellent rate capability (e.g., 112.6Whkg−1 at 28.9kWkg−1) and good stability (capacity retention of 91.6% after 1000 cycles), retaining their applications for large-scale electrical energy storage.