Heterogeneous catalysts were successfully prepared by encapsulating palladium diphosphine complexes into TPB-DMTP-COF by a one-pot self-assembly method. The resulting [Pd]@COF hybrids with highly dispersed Pd−P,P sites performed well in the catalytic methoxycarbonylation of both aliphatic and aromatic olefins.