Magnesium doped ultra-fine RuO2 nanoparticles are prepared by a one-step annealing of Ru-exchanged Mg-MOF-74. Mg-RuO2 exhibits excellent oxygen evolution reaction performance with a low overpotential of 228 mV at 10 mA cm-2. The excellent performance is attributed to the altered electronic structure and the optimized surface atomic arrangement.