Covalent organic framework (COF) membranes have emerged as promising candidates for hydrogen purification due to their tunable pore sizes and robust structures. However, achieving high selectivity and permeability simultaneously remains a challenge due to the inherent pore size distribution of COF materials. In this study, we fabricated two distinct COF membranes, TpPa-1 and TpTGCl, with pore sizes of 1.8 nm and 0.39 nm, respectively, using tailored synthesis methods. The TpTGCl membrane, synthesized via room temperature interfacial polymerization and vacuum-assisted filtration, exhibits an ultrathin nanosheet structure with an interlayer π–π stacking distance of 0.33 nm. This unique architecture, combined with its affinity for CO2 adsorption, enables exceptional hydrogen separation performance, achieving a H2/ CO2 selectivity of 52.5 and a H2 permeability of 3.49 × 10– 7 mol m− 2 s− 1 Pa− 1. Molecular dynamics simulations confirmed the steric hindrance effect as the primary mechanism for the selective permeation of hydrogen. The TpTGCl membrane effectively sieves larger gas molecules ( CO2, N2, CH4, etc.) without the need for material modification or excessive membrane thickness. This study demonstrates the potential of COF membranes with tailored pore sizes for high-performance hydrogen purification and offers valuable insights for the development of advanced separation technologies.