Lithium sulfur batteries have attracted significant attention owing to their remarkably high theoretical capacities and energy density for the potential next-generation energy storage system. Considerable efforts have been developed to improve the redox reversibility and suppress sulfur loss when maintaining their capacities. However, few strategies have enlightened to address shuttle issues via electric-field-responsive film. Here, we postulate a new strategy to create smart electric-field-responsive surface structure and design special molecular film with quaternary ammonium group. The responsive film bonded to carbon matrix can act as a switch to control the on-off of polysulfide channels. Meanwhile, the prepared carbon aerogel (CA) matrix presents highly cross-linked 3D framework, abundant hierarchical pore channels and high specific surface area. The results show the composite sulfur cathode with selective film exhibits outstanding high discharging capacities and long-term cycling stability. Specifically, the cathode with 61.6 wt% sulfur displays an initial specific capacity of 1307 mAh g−1 at 0.2C and maintains 84.0% after 100 cycles. The improved electrochemical performance may mainly benefit from the switch function of self-responsive film, effectively preventing polysulfides escaping from the cathode, suppressing shuttle effect and enhancing the utilization of sulfur. Furthermore, the adsorption calculation by the density functional theory (DFT) shows trapping role of beta-cyclodextrin quaternary ammonium (CDQA) to polysulfides. The DFT simulation further supports the confining and switching mechanism.