Molybdenum disulfide (MoS2), as an alternative electrocatalyst, has great potential to drive the hydrogen evolution reaction (HER). However, due to the catalytic inertness of the base surface and limited active sites, the HER performance of MoS2 has not yet reached the ideal state. Herein, we have successfully fabricated nanoflower-like MoS2 with the porous structure containing defects by doping with Co and P atoms with the hydrothermal method to increase the electron transfer rate, enhance electronic conductivity, and expose more active sites. The optimized Co, P-codoped MoS2 (Co, P-MoS2) possesses a superior catalytic performance to pristine MoS2 evidenced by a relatively lower overpotential (230 mV at 10 mA cm−2) and a very small Tafel slope (53 mV dec−1) with comparatively good stability in acidic media. Meanwhile, it is better than other MoS2-based catalysts in this work, owing to the synergistic effect caused by the codoping of Co and P atoms. In addition, the synthetic method of the material is simple; the experimental raw materials are cheap and easy to obtain, which provides the possibility for large-scale industrial hydrogen production; and it paves a new pathway for improving electrocatalytic performance by multi-atom doping which achieves complementary advantages.