On the basis of theoretical predictions, nitrogen was designed and incorporated into free-standing two-dimensional MoS2 nanosheets. Both the amount of electrochemical active sites on the surface and its intrinsic conductivity could be significantly increased as a result of anion engineering, which can extremely improve the electrocatalytic kinetics toward hydrogen evolution.