Electrocatalytic water splitting is a promising solution for generating clean hydrogen. Transition metal compounds are among the most extensively investigated catalysts developed to date for water oxidation in alkaline media, a process also known as the oxygen evolution reaction (OER). However, the application of these catalysts was constrained by insufficient stability arising from surface oxidation and metal dissolution under high OER potential. In this work, we developed a facile approach using urea-based gel as the precursor of preparing a series of multimetallic carbonitride particles which were encapsulated by N-doped carbon (NC). In particular, (MoCoFeNiZr)CN@NC core–shell structure delivered a low overpotential of 246 mV at a current density of 10 mA cm−2 in 1 M KOH during OER. Importantly, operando differential electrochemical mass spectrometry (DEMS), together with multiple microscopic and spectroscopic analyses, indicated that the NC shells effectively maintained the crystalline stability of carbonitride via suppressing the surface reconstruction during catalysis. The highly graphitic NC also demonstrates excellent stability against oxidation. This work shows a promising strategy of stabilizing electrocatalyst at high anodic potential, paving the way for the development of robust electrode materials for energy conversion.