MoS2 exhibits high catalytic ability; however, its wide band gap (1.73eV) and poor intrinsic conductivity significantly restrict the enhancement of its catalytic activity. To enhance the electron transfer between the interface of heterojunctions and improve the hydrogen evolution reaction (HER) performance, the paper constructs a CoS2/MoS2 heterostructures by growing CoS2/MoS2-X on carbon cloth (CC) using a straightforward one-step method. It investigates the HER properties of the heterojunctions of various molar ratios of ammonium molybdate to cobalt nitrate. The results indicate that the CoS2/MoS2-X catalyst exhibits excellent electrocatalytic activity (73mV@10mAcm−2) and Tafel slope (80.42mV dec−1) at 1.0M KOH when the molar ratio of ammonium molybdate to cobalt nitrate is 1:1 (X=5). CoS2/MoS2-5 exhibits good durability of over 100h when current densities are 10 and 100mAcm−2. Density functional theory (DFT) calculations indicate that heterostructures present an optimized Gibbs free energy of hydrogen adsorption (ΔGH⁎) close to zero, providing insight into the exceptional HER performance. This work provides a simple, effective and innovative strategy for preparing high-activity CoS2/MoS2 catalysts by modulation of electronic structure.