Molecular metal compounds have demonstrated excellent catalytic activity and product selectivity in the H 2 evolution reaction (HER) and the CO 2 reduction reaction (CO 2 RR). The heterogenization of molecular catalysts is regarded as an effective approach to improve their applicability. In this work, the molecular catalytic units [Cp*Ir(Bpy)Cl] + and [Ru(Bpy)(CO) 2 Cl 2 ] are constructed in situ on the bipyridine sites of the covalent organic framework for photocatalytic HER and CO 2 RR, respectively. Inheriting the impressive performance of molecular catalysts, the functionalized TpBpy-M exhibits excellent catalytic activity and product selectivity. Under visible light irradiation, the H 2 production rate of TpBpy-Ir is about 760 μmol g -1 h -1 , which is 6.7 times higher than that of TpBpy without built-in catalytic sites. Also, the HCOOH production rate of TpBpy-Ru is 271 μmol g -1 h -1 , with an impressive selectivity of 88%. Control experiments validated that this improvement is attributed to the incorporation of molecular catalytic units into the framework. Photoluminescence spectroscopy measurements and theoretical calculation consistently demonstrate that, under illumination, the photosensitizer [Ru(Bpy) 3 ]Cl 2 is excited and transfers electrons to the catalytic sites in TpBpy-M, which then catalyzes the reduction of H + and CO 2 .