The lack of highly efficient, inexpensive catalysts severely hinders large-scale application of electrochemical hydrogen evolution reaction (HER) for producing hydrogen. MoS2 as a low-cost candidate suffers from low catalytic performance. Herein, taking advantage of its tri-layer structure, we report a MoS2 nanofoam catalyst co-confining selenium in surface and cobalt in inner layer, exhibiting an ultra-high large-current-density HER activity surpassing all previously reported heteroatom-doped MoS2. At a large current density of 1000 mA cm-2, a much lower overpotential of 382 mV than that of 671 mV over commercial Pt/C catalyst is achieved and stably maintained for 360 hours without decay. First-principles calculations demonstrate that inner layer-confined cobalt atoms stimulate neighbouring sulfur atoms while surface-confined selenium atoms stabilize the structure, which cooperatively enable the massive generation of both in-plane and edge active sites with optimized hydrogen adsorption activity. This strategy provides a viable route for developing MoS2-based catalysts for industrial HER applications.