compositions have been extensively investigated. Many approaches, including chemical vapor deposition, [12,13] pyrolysis of metal complexes, [14,15] and carburization of the mixed Mo/W-based compounds and carbon sources, have been developed. [16,17] However, these traditional methods usually suffer from the inevitable aggregation and/or uncontrollable particle sintering with excessive growth at high temperatures, which may lead to the loss of active sites. [6,16,18] To further improve the electrocatalytic performance, three main strategies have been developed as follows: i) nanostructuring to provide larger specific surface areas and expose more active sites; [8,14] ii) doping of heteroatoms to modify the electronic state of the metal elements; [12,19] iii) compositing with carbon-based materials to improve the conductivity and stability of carbides. [20][21][22] Nevertheless, construction of ultrafine dual-phase carbides within nitrogen-rich carbon matrix has rarely been reported until now. [8,23] Recently, metal-organic frameworks (MOFs) have been regarded as the ideal reactive precursors to establish welldefined nanocrystals due to their highly ordered porous structures and diversified metal nodes/organic ligands. [24][25][26] In this work, Zn-based zeolitic imidazolate framework (ZIF-8) substituted with MO 4 units (denoted as ZIF-8-MO 4 , M = Mo or W) dodecahedrons are obtained through an anion exchange reaction between the Zn(imidazolate) 4 2− units in ZIF-8 and MO 4 2− anions in inorganic salts. Their similar four-connected open frameworks ensure the reaction possible. [27] Benefiting from the internal long-range ordered Zn-O-M connectivity, high carbon/nitrogen content, low boiling point of Zn, and high porosity of ZIF-8, the in situ generated carbides are evenly dispersed within the PNCDs in the form of ultrafine nanocrystals. The ultrafine nanocrystals confined within this porous nanostructure results in the strong contact between the carbides and the conductive carbon support, which not only provides more stable active sites but also facilitates the electron transport in the HER process. [18,21,28] Besides, the abundant nitrogen dopants can function as electron acceptors to assist the carbon atoms in the metal lattice, which is immensely conducive to enhance the catalytic activity. [16] Benefiting from the advantages of ultrafine nanocrystals and porous nitrogen-doped
Designing novel non-noble electrocatalysts with controlled structures and composition remains a great challenge for efficient hydrogen evolution reaction (HER). Herein, a rational synthesis of ultrafine carbide nanocrystals confined in porous nitrogen-doped carbon dodecahedrons (PNCDs) by annealing functional zeolitic imidazolate framework (ZIF-8) with molybdate or tungstate is reported. By controlling the substitution amount of MO 4 units (M = Mo or W) in the ZIF-8 framework, dual-phase carbide nanocrystals confined in PNCDs (denoted as MC-M 2 C/PNCDs) can be obtained, which exhibit superior activity toward the HER to the single-phased MC...