• Solid polymer electrolytes formed in situ via covalent organic framework-induced ring-opening copolymerization.
• Solid polymer electrolytes with a high lithium-ion transference number and desirable interfacial compatibility.
• Li⁺ migration mechanisms investigated with density functional theory and molecular dynamics simulations.
• TpPa-COOLi with partial long-range order and –COOLi substituents exhibited superior electrochemical performance.