Polypyrrole functional interlayer is in-situ fabricated uniformly onto the surface of sulfur cathode to inhibit the dissolution of lithium polysulfides and protect sulfur cathode. Li–S battery with the functional inlayer shows an encouraging electrochemical performance. The initial discharge capacity is 719 mAh g−1 and the capacity retains at 846 mAh g−1 even after 200 cycles at 0.2C with an average coulombic efficiency of 94.2%. Moreover, the discharge capacities are 703 mAh g−1 and 533 mAh g−1 at 1C and 2C respectively even after 300 cycles.