Controlling the structural sensitivity and selectivity of metal catalysts in reactions, such as the hydrogen evolution reaction (HER) on cobalt crystals, remains a challenging issue in heterogeneous catalysis. In this study, we introduced a straightforward approach to tuning the phase composition of hexagonal close-packed cobalt (HCP-Co) and face-centered cubic cobalt (FCC-Co) in a core–shell Co/C catalyst through the incorporation of Ru atoms. The HER performance was evaluated by controlling the contents of HCP-Co and FCC-Co phases in the catalysts. Single-atom Ru-doped cobalt catalysts containing dual-phase HCP and FCC were prepared by a mechanical ball-milling zeolitic imidazolate framework (ZIF-67) with appropriate ruthenium chloride, followed by a pyrolysis process. The doping of Ru resulted in changes in the contents of the HCP-Co and FCC-Co phases, which significantly boosted the HER activity of the catalysts. The obtained biphasic Ru-Co/C catalyst demonstrated ultra-low HER overpotential and promising stability in alkaline and acidic media, outperforming single-phase cobalt and commercial Pt/C catalysts. Theoretical calculations revealed the synergistic catalysis effect of biphasic cobalt on HER. These findings, which indicated that significant activity dependence on the crystallographic structure, may inspire new design concepts for efficient metal electrocatalysts.