Molybdenum disulfide (MoS 2 ), a very promising nonprecious catalyst with high hydrogen evolution reaction (HER) catalytic activity, has been extensively studied for its excellent properties. Nonmetal doping and defects can effectively improve the electrocatalytic activity of MoS 2 electrocatalysts, but a lack of systematic studies on nonmetal doping and defect engineering hinders further design and improvement of the MoS 2 electrocatalysts. Herein, a novel strategy is proposed to improve the HER performance of MoS 2 via heavy-ion irradiation. Theoretical calculations show that fluorine (F), as a doping element, exhibits an excellent HER performance of MoS 2 . Doping and defect engineering are combined by irradiating MoS 2 using an F − ion beam with controllable fluence to verify whether F − ions can effectively regulate the electrical structure of MoS 2 and contribute to its HER efficiency. This work provides a strong theoretical basis and experimental support for the rational design of the MoS 2 electrocatalysts and expands the understanding of the optimization of the electrocatalytic activity of other catalysts.