A ternary sulfur/polyaniline–carbon (SPC) black composite was prepared by combining elemental sulfur and polyaniline–carbon black (PANi-C) composite by a continuous two-step thermal treatment at 155°C and 280°C. SPC composites were characterized by field emission scanning electron microscopy, transmission electron microscopy, X-ray diffractometer, Raman spectroscopy, Fourier transformation infrared spectroscopy and X-ray photoelectron spectroscopy. PANi-C is a highly conductive polymer–carbon composite with PANi impregnated in porous carbon. PANi plays a bridge role between sulfur and carbon in SPC composites, resulting in the minimization of active material loss and the improvement of electrochemical performance in lithium sulfur batteries. The cell with SPC composite as cathode showed enhanced cyclablity and good rate capability, retaining a discharge capacity of 732mAhg−1 at 0.2C after 100 cycles.