In general, slow kinetics and cost concern impede the development of electrocatalyst for water splitting. For practical application, the design and development of an inexpensive catalyst efficient towards hydrogen evolution reaction (HER) in acidic as well as alkaline medium is crucial. Here, Ruthenium (Ru) and MoO3 alone are not efficient for HER in the alkaline medium but, Ni and Ru doped MoO3 nanosphere shaped material (Ni-Ru-MoO3) prepared by the facile two-step synthesis process, acts as efficient electrocatalyst towards HER in acidic as well as alkaline medium. The low cost of the prepared catalyst and comparable activity with costly noble metal catalyst is novelty of this work. Due to the synergistic effect of Ni and Ru doping on the MoO3 and enhanced porosity Ni-Ru-MoO3 acts as efficient catalyst. It merely requires 59 and 151 mV overpotential to reach 10 mA/cm2 of current density and exhibits small Tafel slope values as 64 and 68 mV/dec for HER in 1 M KOH and 0.5 M H2SO4 solution, respectively, which are comparable to the respective values obtained for benchmark costly catalyst Pt/C. In addition, this catalyst shows remarkable stability even at high current density of 50 mA/cm2 and time 24 h, low value of charge transfer resistance and high value of electrochemically active surface area, suggesting its substantial electronic conductivity and high electrocatalytic activity. This work presents a good strategy for tuning the electronic structure of MoO3 to make it an efficient catalyst for HER by simply doping it with hetero elements.