The wide-scale implementation of lithium–sulfur batteries is limited by their rapid capacity fading, which is induced by the pulverization of the sulfur cathode and dissolution of intermediate polysulfides. Herein, we reported the encapsulation of sulfur (S) into hierarchically porous carbon nanoplates (HPCN) derived from one-step pyrolysis of metal-organic frameworks (MOF-5). HPCN with an average thickness of ca. 50 nm exhibits a three-dimensional (3D) hierarchically porous nanostructure, high specific surface area (1645 m2 g−1) and large pore volume (1.18 cm3 g−1). When evaluated as a cathode for lithium–sulfur batteries, the HPCN–S composite demonstrates high specific capacity and excellent cycling performance. At a current rate of 0.1 C, the initial discharge capacity of HPCN–S is 1177 mA h g−1. Even at a current rate of 0.5 C, it still delivers a discharge capacity of 730 mA h g−1 after 50 cycles and the Coulombic efficiency is up to 97%. The enhanced electrochemical performance of HPCN–S is closely related to its well-defined 3D porous plate nanostructure which not only provides stable electronic and ionic transfer channels, but also plays a key role as a strong absorbent to retain polysulfides and accommodate volume variation during the charge–discharge process.