The synthesis of M/pN-C (M=Pt, Ru) is illustrated in Fig. (for details see Methods and Supplementary Information). A covalent organic framework (COF), the precursor of pN-C, was prepared via a Schiff-base reaction (Supplementary Figure ). SiO2 was added as the template to create mesopores, which might aid mass transport in fuel cells . pN-C was obtained by pyrolyzing the COF/SiO2 composite at 900 ℃ followed by removal of SiO2 with NaOH. Elemental analysis by combustion method indicated a nitrogen content of 10 wt. % in pN-C. Raman spectra showed the presence of the D band (~1355 cm -1 ) and G band (~1585 cm -1 ), the two characteristic peaks for carbon materials (Supplementary Figure ). Transmission electron microscopy (TEM) image indicated that the pN-C had interconnected macropores and localized mesopores on the carbon (Fig. ). Such a hierarchical pore structure is reported to mitigate mass transfer resistance under fuel cell working conditions . According to N2 adsorption-desorption isotherm, the pN-C has a Brunauer-Emmett-Teller (BET) surface area of 523 cm 2 /g and a Barrett-Joyner-Helenda (BJH) pore volume of 1 cm 3 /g (Supplementary Figure ). Ru/pN-C and Pt/pN-C, were prepared by loading RuCl3 and H2PtCl6 onto the pN-C respectively and reducing under an H2 atmosphere (Fig. ). As control samples, Ru/C and Pt/C were prepared similarly by loading Ru and Pt to commercial Vulcan XC-72R carbon black. The PGM loading of all samples are controlled to be 10 wt. %. X-ray diffraction (XRD) confirmed the presence of metallic phases in all samples (Supplementary Figure ). TEM images revealed that all samples contained ultrasmall nanoparticles with a mean size smaller than 1.6 nm (Supplementary Figure ). In addition, spherical aberration-corrected high angle-annular dark field-scanning TEM (HAADF-STEM) revealed there were single atoms (SAs) on pN-C in both Ru/pN-C and Pt/pN-C (Fig. ). However, the quantity of Pt-SAs is much higher than Ru-SAs. In an attempt to obtain the corresponding SA-alone samples (0.1%-Ru/pN-C and 0.1%-Pt/pN-C) as controls, we used the same synthetic method but with a metal loading of 0.1 wt. %. Spherical aberration-correct HAADF-STEM confirmed the SA nature of Pt atoms in 0.1%-Pt/pN-C (Supplementary Figure ). On the other hand, in addition to Ru SAs, sub-nano clusters of Ru were observed in 0.1%-Ru/pN-C (Supplementary Figure ). The HOR activities of the M/pN-C and M/C (M = Ru, Pt) samples were tested in an 0.1 M H2saturated KOH solution with a rotating disc electrode (RDE). In order to avoid the interference of diffusion limitation, the PGM loading was kept low (3.5 μgPGM/cm 2 ) by diluting the catalysts with extra carbon black (See Methods). A commercial PtRu/C was used as a benchmark reference. Shown in Fig. , both Ru/pN-C and Pt/pN-C showed significantly improved HOR activity comparing to control groups, and approached the activity of benchmark PtRu/C. The 0.1%-Ru/pN-C and 0.1%-Pt/pN-C, in comparison, had negligible anodic current densities. This result indicates that Pt and Ru SAs are not active for HOR. We quantitatively evaluated the catalytic activity of the samples by two kinetic parameters (Supplementary Table ): the PGM mass-normalized exchange current density (j0,mass) and the electrochemical surface area (ECSA)-normalized exchange current density (j0,ECSA). The ECSAs were estimated by the Cu stripping method (Supplementary Figure , 9 and Supplementary Note 1). Specifically, the j0,ECSA for Ru/pN-C is 3.5 times of Ru/C, while the j0,ECSA of Pt/pN-C is 2.7 times of Pt/C. Both Ru samples displayed typical early deactivation at around 0.1 V vs RHE, which can be attributed to the active site being blocked by surface hydroxy species . The commercial PtRu/C did not reach a diffusion limited current density, probably due to the spatially scattered distribution of the metal catalysts on RDE. The latter was a result of the dilution of a high original metal loading (from 60 wt. % to 1.25 wt. % PGM with a dilution factor of 48 times). A similar observation was reported previously .