Molybdenum carbide (Mo2C) has high catalytic activities toward electrocatalytic hydrogen evolution reaction (HER) owing to its high surface activity and electrochemical properties. However, the defects modification of Mo2C, which plays an important role in the HER activity, is relatively scarce in the theoretical research. Herein, in this work, based on first-principles calculations, we screen the influences of vacancies, nonmetal doping (X-C/T, X = N, O, F, P and S) and metal substitutional doping (Y-Mo, Y = Re and W) on HER of two-dimensional Mo2C. The results reveal that vacancies of Mo6C (0.02 eV) and Mo3C (0.22 eV), substitutional dopants of O-C, S-C, Re-Mo (-0.33 similar to 0.08 eV) and adsorptive dopants of N-T, F-T, P-T, S-T (-0.26 similar to 0.14 eV) show enhanced catalytic activity with the absolute value of hydrogen adsorption free energy (Delta GH*) smaller than 0.33 eV. A negative linear relationship is observed between Delta GH* and d band center of transition metals in vacancies and metal dopants, but not in the configurations with nonmetal doping. The results provide more insight and guidance for the design of Mo2C electrocatalyst. (C) 2022 Hydrogen Energy Publications LLC. Published by Elsevier Ltd. All rights reserved.