3D architecture constructed via the confined growth of MoS2 nanosheets in nanoporous carbon derived from metal-organic frameworks for efficient hydrogen production.