As one of the most practical solutions to on-board hydrogen storage, MgH2 has attracted a lot of attention, which is mainly due to its high hydrogen capacity (7.7 wt%), high volumetric storage density(55 kg/m3) and low cost. The main obstacles for its large scale applications are the relatively low rates of hydrogen absorption and desorption in the material, which can be traced back to the slow diffusion of hydrogen into the crystal MgH2. In this work, the doping effect of Li on the release of hydrogen at the MgH2(001) surface is studied by the first-principles calculations based on the density functional theory and the climbing nudged elastic band method. Two possible diffusion and desorption paths for H atoms are designed. In path one, the two hydrogen atoms, which bond with the same substituted Mg atom in the first surface layer, climb over the nearest neighbor Mg atom to form a hydrogen molecule. In path two, the two nearest hydrogen atoms, which bond with two different Mg atoms in the first surface layer, combine directly together to form a hydrogen molecule. The calculated results show that the energy barriers for the two paths at the pure MgH2(001) surface are 2.29 and 2.50 eV, respectively. When the center Mg atom is replaced by Li atom, the corresponding energy barriers decrease to 0.31 and 0.22 eV, respectively. Compared with the pure surface, the Li-doped surface has the energy barriers that reduce almost 87% and 91%. It indicates that the formation and release of H2 at MgH2 (001) surface become easier after the surface has been doped with Li atoms. Furthermore, the doping effects are analyzed with the density of states. Compared with the pure surface, the Li-doped surface has a Fermi level that lowers from the band gap to the top of the valance band and the system is changed from insulator into conductor. At the same time, the bonds between Li and hydrogen atoms in the Li-doped system are weaker than those between the substituted Mg and the corresponding hydrogen atoms in the pure system. As a result, the doping of Li atoms makes it easier to form and release H2 at MgH2(001) surface.