[Display omitted] • Mo-doped CoFe-PBA was employed as the TMPs/NC hybrid materials precursor. • A novel porous Mo-CoFeP/NC nanocubes were constructed. • The existence of Mo and NC improved the conductivity and stability of Mo-CoFeP/NC. • Mo-CoFeP/NC exhibited satisfactory activity of HER (η 10 = 145 mV) in 1 M KOH. Reasonable design of active and economic catalysts for hydrogen evolution reaction (HER) is significant to green production. Herein, porous Mo-doped CoFeP/nitrogen doped carbon (NC) nanocubes were constructed via phosphiding Mo-doped CoFe-Prussian blue analogue. As-obtained Mo-doped CoFeP/NC exhibits excellent HER activity, which requires an overpotential of 145 mV to reach 10 mA cm−2 and exhibits a small Tafel slope of 68 mV·dec−1, indicating that doping of the Mo could suitably modulate the electronic structure of CoFeP/NC nanocubes. [ABSTRACT FROM AUTHOR]