Composite membranes embodying multilayered architecture have been on an uptrend to tap the synergy between different materials to attain new heights in gas separation performance. In the light of sustainable materials research, covalent organic frameworks (COFs) and metal-organic frameworks (MOFs) have emerged as cutting-edge platforms for molecular-sieving membranes owing to their phenomenal surface areas, ultrahigh porosities, and precise control over chemical functionalities. In this study, we report for the first time a three-dimensional (3D) MOF-mediated strategy where a specially designed MOF film provides the binding sites along the vertical direction to anchor the two-dimensional (2D) COF structural building units. The strong chemical bonding between the 3D MOF and 2D COF provides a new outlook to fabricate 2D COF-based composite membranes. The π-stacked columns of 2D H2P-DHPh COF that can contribute to direct pathways for gas transport render the resulting membrane incredibly promising for high-flux gas separation. Besides, the chemical synergy between the MOF and COF endows the thus-developed H2P-DHPh COF-UiO-66 composite membrane with unprecedented H2/CO2 gas mixture selectivity (32.9) as well as ultrahigh H2 (108 341.3 Barrer) and CO2 permeabilities, which significantly outperform the present Robeson upper bound and polymer membranes hitherto reported.