Molybdenum disulfide (MoS2), although it has shown great potential use in electrocatalysis, owns inert basal planes and the low electrical conductivity that limit its effective application. In this work, a MoS2/carbon nanocage hybrid catalyst (MoS2/Co–N–CN2) with a higher density of exposed edge sites and conductivity was developed for efficient hydrogen evolution reaction (HER) and oxygen evolution reaction (OER). The hybrid catalyst was successfully prepared via confined growth of MoS2 in the porous carbon matrix derived from the metal organic framework ZIF-67. X-ray photoelectron spectroscopy revealed that the hybrid catalyst contained a significantly higher density of terminal sulfur edges than bulk MoS2. The hybrid catalyst exhibited a high catalytic activity for HER and OER, with low onset overpotentials and small Tafel slopes. This enhanced catalytic performance is a direct result of the increased exposed sulfur edge sites, high surface area, and unique synergic effects between MoS2 nanoplates and Co–N-doped porous carbon matrix. Therefore, the hybrid (MoS2/Co–N–CN2) catalyst serves as a highly promising bifunctional catalyst for HER and OER.