Lithiums–sulfur battery is considered as one of the most promising energy storage devices to replace the current Li ion batteries because of its high theoretical capacity of 1675mAhg−1. However, the poor cycle stability hinders the further development of this battery system. In order to improve the stability of Li–S batteries, the diffusion of polysulfides from electrodes into electrolyte should be suppressed. Herein, we utilize a positively charged polyelectrolyte to functionalize the electrode materials with the aim to hamper the polysulfides dissolution via electrostatic interaction between strong positively charged polyelectrolyte and negatively charged polysulfides anion. The effect of the functionalization quantity of poly(diallyl dimethylammonium) chloride (PDDA) and functionalization sequence on cycling performances is investigated in detail. It is found that the sulfur–graphene composite (SG) directly functionalized with 10 times PDDA exhibited best cycling stability. At a discharge current density of 0.2C, much higher capacity retention was realized on the functionalized electrodes than the unfunctionalized (81% vs. 47.3%) after 120 cycles. The as-observed results demonstrate that the electrostatic interaction can effectively prolong the cycling life of Li–S batteries, which provides a new promising strategy for improving the electrochemical performance of Li–S batteries.