Lithium−sulfur batteries (LSBs), as very promising lithium-ion batteries, have received widespread attention from researchers. However, the low conductivity of sulfur in lithium sulfur batteries and the significant volume expansion during charging and discharging seriously affect the high rate performance of the battery, hindering its practical application. In this study, we designed bifunctional 3D covalent organic frameworks (COFs) with interconnected nanostructures and significant catalytic activity by connecting flexible cycloocta thiophene blocks with porphyrin units. 3D COFs act as catalytic nanotraps in the cathode of LSBs, providing confinement and chemical adsorption of lithium polysulfides, thereby improving the redox kinetics of sulfur. The acceleration of Li 2 S nucleation by Ni-porphyrin active centers, as confirmed through in situ X-ray diffraction and Raman spectroscopy, enhances polysulfide conversion kinetics, further improving battery performance. The constructed battery that incorporates the 3D COF exhibits a minor fading trend of only 0.05% per cycle over 500 cycles at 1 C, outperforming commercial carbon nanotubes. Additionally, under lean electrolyte conditions and high sulfur loading, the 3D COF shows promise as a practical solution for high-energy-density LSBs, achieving an actual area capacity of 7.0 mAh cm −2 at 0.2 C. This research sets a solid foundation for the tailored design of COFs-based bifunctional catalytic nanotraps that can serve dual roles as both host materials and electrocatalysts in Li−S batteries.