Main observation and conclusion The efficient production and utilization of hydrogen play an important role in the closed loop of energy conversion. It is an urgent need to find low‐cost and high‐performance replacements for platinum‐based catalysts towards hydrogen oxidation reaction (HOR) and hydrogen evolution reaction (HER). Herein, bifunctional RuNi alloy nanoparticles embedded in oxygen‐doped carbon were prepared via simple annealing of Ru‐doped Ni‐BTC, the limiting current density of which could reach 2.46 mA/cm 2 (close to Pt) in 0.1 mol/L KOH for HOR. And the low overpotentials of only 29 mV in 1 mol/L KOH and 62 mV in 0.5 mol/L H 2 SO 4 were needed to reach the current density of 10 mA/cm 2 for HER. The effect of alloying and oxygen‐doped graphene contributed to the excellent activity and stability during hydrogen electrocatalysis. This work provides new ideas for the development of novel types of hydrogen electrocatalysts and enriches the application of MOFs in HOR.