The shuttle effect of soluble lithium polysulfides (LiPSs) and their insoluble reduction products (Li2S/Li2S2) depositing on the surface of lithium anode are the major drawbacks for the practical application of lithium sulfur (Li-S) batteries. In this work, a thin and light interlayer constructed by boron and nitrogen co-doped carbon nanofibers (BNCNF) has been produced by a facile electrospinning method with following thermal treatment. Through introducing BNCNF film between cathode and separator, the charge transfer resistance decreases largely and the shuttle effect remits to a great extent. The BNCNF exhibits excellent absorption ability for polysulfides under the role of the B⋯S and N⋯Li chemical interaction, and especially the formation of N=B/N-B structure in the carbon nanofiber framework reinforces the electropositive interaction between B atoms and Sx 2− and the electronegative interaction between N atoms and Li+ cation, simultaneously. The capacity and cycling life of Li-S batteries are improved significantly due to the BNCNF interlayer. The cell with BNCNF interlayer delivered an initial capacity of 1054.7mAhg−1 at 1.0C over 1000cycles with a decay rate of 0.058%. And even at high current density of 5.0C, it had an initial capacity of 612.2mAhg−1 over 600cycles with a decay rate of 0.085%. The BNCNF interlayer developed here provides a promising methodology to enhance the performance of Li-S batteries.