Magnetic gamma '-Fe4N has been considered as one of the most promising non-noble materials for the electrocatalysis of the oxygen evolution reaction (OER) due to its excellent magnetic properties, unique anti-perovskite-like structure, high chemical stability, and high intrinsic activity. Exploring environmentally friendly and efficient nitrogen sources instead of ammonia is still a huge challenge associated with obtaining pure gamma '-Fe4N. In addition, it is widely acknowledged that the unique morphological and structural tuning of metal nitrides could effectively enhance their electrocatalytic capabilities. In this study, two kinds of magnetic gamma '- Fe4N with different morphologies (cuboidal and rodlike) are obtained by combining facile solvent-regulated ferrous oxalate precursors with ethylenediamine-assisted thermal nitriding. The facile morphological tuning endows gamma '-Fe4N with excellent soft magnetic properties while improving the activity toward OER. Specifically, the saturation magnetization of cuboidal gamma '-Fe4N reaches up to 167.38 emu g-1. In addition, compared with the RuO2 benchmark for OER, cuboidal gamma '-Fe4N shows more excellent OER electrocatalytic performance, showing an overpotential of 253 mV@10 mA cm-2 in 1.0 M KOH and a low Tafel slope (45 mV dec-1). This is of great significance for the non-ammonia synthesis of iron nitride and the development of non-noble-metal-based OER electrocatalysts.