Molybdenum disulfide (MoS2), a transition metal dichalcogenide, has been demonstrated as a promising substitute for noble metal catalysts in the hydrogen evolution reaction (HER). However, its practical application is limited by the inert nature of the basal planes. In this study, we developed a highly active and robust MoS2 catalyst with uniform triangular nanoholes on its basal plane via nanoscale patterning. The process successfully created edge defects with a Mo-terminated zigzag configuration. Notably, owing to the exposure of Mo-terminated zigzag edges at numerous nanopores, the overpotential of the nanoporous MoS2–x was significantly lower than that of the pristine MoS2. In addition, the stable catalytic performance of the nanoporous MoS2–x was verified under continuous measurement for 16 h. This study provides new insights into the nanoscale patterning and edge engineering of two-dimensional MoS2 to design highly efficient and low-cost HER electrocatalysts.