Membrane separation is making substantial contributions to water purification. Particularly important is the pore-size control designed for molecular sieving. Regarding water permeation, filtration experiments accentuate the importance of hydrophilic pores in enhancing the water adsorption capacity, while hydrophobic pores enable low-friction water diffusion. To reach both the criteria, we herein precisely design the pore metrics and pore functionalities to prepare a covalent organic framework (COF), termed TUS-46, membrane. Credited with pore sizes befitting for size-selective molecular exclusion and negative electrostatic pore walls, the TUS-46 COF membrane shows excellent rejection performance toward anionic dyes. Attributed to the free aldehyde functionalities in the framework resulting from unbalanced stoichiometry, the TUS-46 COF membrane also shows a 10-fold higher water permeance compared to the analogue COF membrane without free aldehyde functionalities. In particular, the in situ construction of hydrophilic nanospaces partaking in high water uptake and hydrophobic nanospaces facilitating fast water diffusion in a single COF structure endows the TUS-46 membranes with unprecedentedly high water flux. The stoichiometric imbalance approach presented herein offers a different route to COF membrane fabrication and may impart with an unprecedented control handle on the permeability and separation selectivity of COF membranes.