Proton-exchange membrane water electrolysis in acidic solutions holds great promise for advancing the green-hydrogen economy but limited by using precious-metal catalysts. Here, we develop a low-cost Co3O4-based catalyst with oxygen vacancies and Nd-insertion (Nd-CoOx). This catalyst achieves a low overpotential of 317 mV at 10 mA cm-2 for acidic oxygen evolution reaction and remains stable over 800 h. The oxygen vacancies in Nd-CoOx enhance its catalytic activity, while Nd enables the long-term stability through a flexible "breathing mode" during oxygen evolution reaction, as revealed by in-situ methods such as X-ray absorption spectroscopy and Raman spectroscopy. The presence of Nd also improves the catalytic activity with the oxide path mechanism. This favorable strategy can be extended to other lanthanides. When used as the anode, Nd-CoOx delivers good performance in water electrolysis to achieve 200 mA cm-2 at a low cell voltage of 1.69 V with low degradation over 100 h, and can reach 1 and 2 A cm-2 at 1.93 V and 2.12 V, respectively.