Palladium-catalysed cross-coupling reactions, central tools in fine-chemical synthesis, predominantly employ soluble metal complexes despite recognized challenges with product purification and catalyst reusability1,2,3. Attempts to tether these homogeneous catalysts on insoluble carriers have been thwarted by suboptimal stability, which leads to a progressively worsening performance due to metal leaching or clustering4. The alternative application of supported Pd nanoparticles has faced limitations because of insufficient activity under the mild conditions required to avoid thermal degradation of the substrates or products. Single-atom heterogeneous catalysts lie at the frontier5,6,7,8,9,10,11,12,13,14,15,16,17,18. Here, we show that the Pd atoms anchored on exfoliated graphitic carbon nitride (Pd-ECN) capture the advantages of both worlds, as they comprise a solid catalyst that matches the high chemoselectivity and broad functional group tolerance of state-of-the-art homogeneous catalysts for Suzuki couplings, and also demonstrate a robust stability in flow. The adaptive coordination environment within the macroheterocycles of ECN facilitates each catalytic step. The findings illustrate the exciting opportunities presented by nanostructuring single atoms in solid hosts for catalytic processes that remain difficult to heterogenize.