A series of orientation-adjustable metal–organic framework (MOF) nanorods, CoFe(dobpdc)-I to CoFe(dobpdc)-III (dobpdc = 4,4′-dihydroxybiphenyl-3,3′-dicarboxylate), is developed on a 3D nickel foam (NF) template. By modulating the solvent composition for synthesis, the feature of MOF nanorods on the template can be varied from disorganized to a unidirectional orientation perpendicular to the NF. Well-aligned, vertically oriented CoFe(dobpdc)-III nanorods are hydrophilic and have more exposed active sites and interfacial charge transfer ability. Consequently, they exhibit a superior activity for oxygen evolution reaction (OER) with ultralow overpotentials of 176 and 240 mV at 10 and 300 mA cm–2 in 1.0 M KOH (aq), respectively. CoFe(dobpdc)-III also shows a record low overpotential of 204 mV at J10 mA cm–2 among the electrocatalysts based on CoFe MOF and an excellent overpotential at a high current density (100 mA cm–2) of 312 mV in 0.1 M KOH (aq). This is the first report of a convenient method to straighten up MOF nanorods on a template for highly efficient OER.