Fabrication of covalent organic framework (COF) membranes for molecular transport has excited highly pragmatic interest as a low energy and cost-effective route for molecular separations. However, currently, most COF membranes are assembled via a one-step procedure in liquid phase(s) by concurrent polymerization and crystallization, which are often accompanied by a loosely packed and less ordered structure. Herein, we propose a two-step procedure via a phase switching strategy, which decouples the polymerization process and the crystallization process to assemble compact and highly crystalline COF membranes. In the pre-assembly step, the mixed monomer solution is casted into a pristine membrane in the liquid phase, along with the completion of polymerization process. In the assembly step, the pristine membrane is transformed into a COF membrane in the vapour phase of solvent and catalyst, along with the completion of crystallization process. Owing to the compact and highly crystalline structure, the resultant COF membranes exhibit an unprecedented permeance (water ≈ 403 L m−2 bar−1 h−1 and acetonitrile ≈ 519 L m−2 bar−1 h−1). Our two-step procedure via phase switching strategy can open up a new avenue to the fabrication of advanced organic crystalline microporous membranes.