Through the melt-diffusion method, S@ZIF-8, a sulfur and metal–organic framework (MOFs) ZIF-8 composite material has been synthesized and utilized as cathode for lithium sulfur battery. Encapsulated into the matrix of ZIF-8, sulfur molecules are restricted in the cages with small apertures and the dissolution problem during the charge/discharge process has been alleviated. Owing to the strong confinement of ZIF-8 matrix to the sulfur molecules inside, the Li–S@ZIF-8 battery shows a reverse capacity of ∼510mAh/g after 100 cycles at a 0.1C charge/discharge rate, enabling the S@MOFs materials promising candidates for novel lithium–sulfur battery cathodes.