Two new imidazolium-based cationic COFs were synthesized and employed as all-solid electrolytes, and exhibited high lithium ion conductivity at high temperature. The assembled Li-ion battery displays preferable battery performance at 353 K.