The design and construction of an efficient, stable, and low-cost electrocatalyst are the main challenge for hydrogen evolution reaction (HER) via water splitting. Herein, a dual-active-site Co−Ru-based HER electrocatalyst (ZIF-67@ZIF-8@Ru-900) was derived from the core−shell zeolitic imidazolate framework (ZIF) structure of ZIF-67 and ZIF-8 with a controlled spatial metal loading position. Benefiting from the effective synergistic electronic interaction between Co and Ru sites, the 3D porous architecture, and the pyridinic N species, the as-prepared ZIF-67@ZIF-8@Ru-900 exhibited an outstanding HER performance, showing an overpotential of only 13 and 29 mV to reach a current density of 10 mA cm −2 in 1 M KOH and 0.5 M H 2 SO 4 , respectively, along with reliable catalytic stabilities.