By introducing lithiophilic groups and electrochemically stable quinolyl aromatic ring linkages, we prepared covalent organic frameworks (COFs) exhibiting a large band gap with an ultralow HOMO value (-6.2 eV under vacuum) and oxidative stability up to 5.6 V (versus Li+ /Li) as solid-state electrolytes (SSEs). The obtained flexible COF SSE thin films showed a holistically oriented arrangement along the (001) facet with remarkable ionic conductivity up to 1.5×10-4 S cm-1 at 60 °C and excellent mechanical strength with a high Young's modulus of 10.5 GPa. Molecular dynamic simulations showed that lithium ions are transmitted in this COF SSE by directional hopping paths with fast drift velocity. The COF SSE film was used to assemble all-solid-state lithium metal batteries with nickel-rich cathodes (NMC811). The batteries demonstrated stable cycling performance over 400 cycles, high coulombic efficiency (>99 %), and could also withstand abuse tests, such as folding.