A sulfur cathode is designed with three-dimensional (3D) cubic mesoporous carbon CMK-8 as the matrix of sulfur, and polypyrrole (PPY) as the wrapping layer. CMK-8 provides perfect 3D conductive network. Furthermore, PPY is coated onto the surface of CMK-8/sulfur (CMK-8/S) composite to inhibit the migration of lithium polysulfide and offer better lithium ion conductive channels. The microstructure and electrochemical performance of the PPY@CMK-8/sulfur (PPY@CMK-8/S) cathode are investigated systematically. The results show that PPY layer with about 50 nm thickness is coated uniformly on the surface of CMK-8/S. The Li–S battery with PPY@CMK-8/S as cathode material presents a discharge capacity of 937.8 mAh g−1 at 20 cycles and is stabilized at about 860 mAh g−1 after 100 cycles at 0.2C.