Here we report a nano-porous sulfur–polyaniline (SPANI) electrode with high sulfur loading, excellent cycling and rate capability for Li–S batteries. The SPANI has a high degree of interconnected nano-porous structures conducive to large sulfur loading and fast mass transportation. In addition, a disulfide chain on PANI is also functioned as the electrochemical redox component. While the main positively charged backbone chain in SPANI provides electron conductivity and electrostatic attraction force to stabilize polysulfide anions during cycling. As a result, the SPANI electrode demonstrates a high reversible capacity of 750mAhg−1 with 89.7% of capacity retention over 200 cycles at 0.3C, and an excellent high-rate response up to 2C over 200 cycles with a good sulfur utilization. The covalently bonded sulfur on positively charged polymer substrate offers a new way to improve energy storage capabilities of Li–S batteries.