Shuttle effect and sluggish conversion kinetics of lithium polysulfides (LiPSs) have become the bottleneck in lithium–sulfur (Li-S) batteries. Herein, hierarchically porous nitrogen-doped carbon spheres with highly dispersed Co1–XS nanoparticles (CoXS-NC) as a trapping-catalyst interlayer for high-performance Li-S batteries is proposed. The nitrogen-doped hierarchically porous carbon spheres generate high specific surface area and large pore volume which provide adequate sites for the adsorption of LiPSs and facilitate the good dispersion of Co1–XS nanoparticles. Nitrogen doping and Co1–XS modification improve the polarity, which promotes the adsorption and rapid conversion of LiPSs. The exceptional properties of the CoXS-NC interlayer are confirmed with an exceeding low delay rate of 0.031% per cycle after 1000 cycles at 0.5 C and an outstanding retention rate of 78.7% over 300 cycles at 2 C. Even employed with high sulfur loading of 6 mg cm–2, it also delivers a high initial areal capacity of 5.74 mAh cm–2 at 0.1 C with capacity retention of 4.58 mAh cm–2 after 100 cycles. This research opens up possibilities for the construction of multifunctional interlayers for use in commercial Li-S batteries.