A nanochannel membrane has the prospect of large-scale separation. However, selectivity in enantioseparation is a challenge, due to the size difference between nanochannels and enantiomers. Here, we compartmented nanochannels by the in situ synthesis of a L-tyrosine functionalized covalent organic framework (L-Tyr-COF). The L-Tyr-COF decreased the pore size of channels to match with naproxen enantiomers (S/R-NPX) and improved the enantioselective gating. In contrast to the surface-functionalized nanochannels (L-Tyr channel), the L-Tyr-COF packe...