Recently there has been considerable interest in the utilization of covalent-organic frameworks (COFs) as ion-exchange membranes. While rapid ion conduction is experimentally observed in COF membranes, the underlying mechanism remains elusive. Herein, we report a molecular simulation study on chloride ion (Cl−) conduction in four COF membranes functionalized with quaternary ammonium groups (QA-2, QA-4, QA-6 and QA-EO) of different side chains (ethyl, butyl, hexyl and diethyl ether). It is revealed that membrane flexibility is crucial to be incorporated in simulation for reliable predictions. The Cl− conductivities in the four membranes are predicted to decrease as COF-QA-2 > COF-QA-4 ≈ COF-QA-EO > COF-QA-6, which is in good agreement with experimental data. The pore size, rather than membrane-Cl− interaction, is unravelled to be the key factor governing the trend of conductivity. The microscopic insight provided by simulation is useful to elucidate the fundamental mechanism of ion conduction, and might facilitate the design of new COF membranes for optimal ion conduction.