## Abstract

P-rich transition metal phosphides (TMPs) with abundant P sites have been predicted to be more favorable for hydrogen evolution reaction (HER) catalysis. However, the actual activities of P-rich TMPs do not behave as expected, and the underlying essence especially at the atomic level is also ambiguous. Our structural analysis reveals the inferior activity could stem from the reduced overlap of atomic wave functions between metal and P with the increase in P contents, which consequently results in too strong P-H interaction. To this end, we used N-induced lattice contraction to generally boost the HER catalysis of P-rich TMPs including CoP_{2}, FeP_{2}, NiP_{2}, and MoP_{2}. Refined structural characterization and theoretical analysis indicate the N-P strong interaction could increase the atomic wave function overlap and eventually modulate the H adsorption strength. The concept of lattice engineering offers a new vision for tuning the catalytic activities of P-rich TMPs and beyond.

## INTRODUCTION

Water electrolysis, preferably powered by sustainable energy sources, has been considered as one of the most feasible approaches to achieve scalable and renewable hydrogen production (*1*–*4*). However, the sluggish kinetics and the associated substantial energy losses severely impede the energy conversion efficiency, which imperatively demand efficient water electrolysis catalysts (*5*–*7*). Pt-based materials, as the state-of-the-art hydrogen evolution reaction (HER) catalysts, are seriously constrained by the crustal scarcity and high cost (*8*, *9*). To this end, many researchers have been dedicated to exploring inexpensive and earth-abundant non-noble metal-based HER catalysts, such as transition metal oxides (*10*–*12*), phosphides (*13*–*16*), chalcogenides (*17*–*19*), nitrides (*20*–*22*), and carbides (*23*–*25*). Although notable processes have been achieved in the past decades, their performance is still far less than that of Pt, especially at acidic condition, and searching new catalysts is still the primary goal (*26*). Very recently, transition metal phosphides (TMPs) attract special attention for HER catalysis, due to their diverse compositions, unique catalytic surface, excellent chemical stability, and electrical conductivity (*1*, *27*). Typically, the negatively charged P sites with moderate electronegativity could act as Lewis bases to trap the positively charged protons, potentially endowing the TMPs with a Gibbs free energy of adsorbed H (H_{ad}) close to zero. For this reason, it has been consciously predicted that the HER performance of TMPs could be further boosted with the increase in P contents in the TMPs (*28*–*30*). For instance, Pan *et al.* (*31*) found that CoP nanoparticles exhibited significantly higher catalytic activity than Co_{2}P. However, as ratio of P was further increased, the HER performance of TMPs was not promoted as expected (*1*, *32*). The reason for the inferior HER activities of the P-rich phosphides is actually still ambiguous, especially at the atomic level. Undoubtedly, unraveling the underlying catalytic behaviors of P-rich TMPs is the presupposition for essentially unlocking the limiting factors for HER catalysis and eventually constructing superior HER catalysts, but unfortunately they have been rarely studied so far.

Here, we take CoP_{2}, a typical P-rich metal phosphide, as an example to investigate the catalytic performance of P-rich TMPs. According to the bond order conservation principle, the increase in P contents will correspondingly reduce the overlap of atomic wave functions, which typically results in strong interaction between P-rich TMPs and H_{ad} and eventually hinders the intrinsic HER activities. So, the limitation of P-rich TMPs for HER catalysis is probably attributed to the decrease in intrinsic per-site activity. Structural analysis reveals that CoP_{2} has a unique crystal structure, where each Co is coordinated with six P atoms to form a slightly distorted octahedron (Fig. 1A), and the distorted octahedrons are connected by the P─P covalent bond illustrated by the electron density map in Fig. 1B. Therefore, from the structural perspective, modulating the nonpolar P-P interaction to tailor the overlap of atomic wave functions is the key to further boost the intrinsic HER activity of CoP_{2}.

In this work, we rationally incorporate nitrogen into the CoP_{2} structures to increase the overlap of atomic wave functions via the N-induced lattice contraction. Excitingly, the N-modified CoP_{2} (N-CoP_{2}) nanowires (NWs) display an impressive overpotential of 38 mV at 10 mA cm^{−2}, which is substantially smaller than the CoP_{2} NWs and even close to the benchmark Pt/C catalysts. Refined structural characterization and theoretical calculations consistently reveal that the created P─N bonds in N-CoP_{2} could bring lattice contraction to increase the atomic wave function overlap, which consequently broadens the local energy bandwidth with the downshift of the valence band center and correspondingly decreases the electron coupling between CoP_{2} and H_{ad} to facilitate the HER catalysis. We also demonstrate that the N-P strong interaction can generally boost the HER activities of a variety of P-rich TMPs including CoP_{2}, FeP_{2}, NiP_{2}, and MoP_{2}. Using lattice engineering for band structure tuning provides a new pathway to the rational construction of superior HER catalysts and beyond.

The N-CoP_{2} NWs are fabricated via a three-step process, as illustrated in Fig. 2A. Typically, Co (CO_{3})* _{x}*OH

*NWs are first grown on carbon cloth (CC) using a well-developed hydrothermal reaction (*

_{y}*33*). Then, the prepared Co(CO

_{3})

*OH*

_{x}*NWs are converted to CoP*

_{y}_{2}NWs through a thermal phosphidation process in a home-built tube furnace system. Last, nitrogen is incorporated by calcining the CoP

_{2}NWs in ammonia atmosphere. Figure S1 presents the SEM images of the prepared Co(CO

_{3})

*OH*

_{x}*, which show that the entire CC is uniformly covered with well-aligned NW arrays. Even after the phosphidation and the consequent nitrogen incorporation, the NW morphology still can be preserved (Fig. 2B and fig. S2). Meanwhile, the transmission electron microscopy images (fig. S3) indicate that the smooth NW becomes rougher after these thermal treatments. In addition, x-ray diffraction (XRD) is used to acquire the structural information. The diffraction peaks located at around 24.8°, 35.2°, 35.6°, and 37.6° correspond to the (−111), (002), (200), and (−121) planes, respectively, of the monoclinic CoP*

_{y}_{2}(Joint Committee on Powder Diffraction Standards no. 77-0263). CoP

_{2}and N-CoP

_{2}NWs prepared at 350°C show very similar diffraction patterns, while the diffraction peaks have slightly shifted to the higher angle region with the N incorporation (Fig. 2C and fig. S4), suggesting that N doping does not intrinsically change the structures of CoP

_{2}but leads to the slightly compressed interplanar distances. Moreover, with the further increase in the ammonia treatment temperatures, N-CoP

_{2}eventually undergoes phase segregation to form the mixture of CoP

_{2}and CoP (fig. S5). The energy-dispersive x-ray (EDX) spectrum of N-CoP

_{2}reveals the atomic ratio of Co, P, and N is around 1:1.74:0.3 (fig. S6). In addition, the high-angle annular dark-field scanning transmission electron microscopy (HAADF-STEM) and the corresponding EDX elemental mapping images indicate that Co, P, and N are homogeneously distributed over the NW (Fig. 2D). Meanwhile, the atomic resolution HAADF analysis in Fig. 2 (E and F) reveals that the incorporation of N into CoP

_{2}results in the decreased d-spacing of the (002) and (020) facets, which is consistent with the peak shift toward higher angles in the XRD patterns. The quantified structure contraction parameters estimated by atomic resolved HAADF and XRD characterizations are listed in table S1. Moreover, the strain tensor values using the geometric-phase analysis of N-CoP

_{2}are more negative than those of CoP

_{2}, proving that N doping gives rise to the lattice contraction in N-CoP

_{2}.

To unravel the effects of N dopants on the electronic structures of CoP_{2}, x-ray photoelectron spectroscopy (XPS) is further conducted. Figure 3A presents the typical XPS Co 2p spectra of CoP_{2} and N-CoP_{2}. The peaks located at ~778.59 and 793.60 eV are ascribed to the Co 2p_{3/2} and Co 2p_{1/2} of the Co─P bonds, respectively (*32*, *34*). After N doping at 350°C, the binding energies of Co 2p_{3/2} and Co 2p_{1/2} only exhibit a very slight shift to the lower energy region. Moreover, with the increase in the ammonia treatment temperatures, gradual shifts are observed (fig. S7A), which may be originated from the created intrinsic defects, due to the reducing property of the ammonia. Meanwhile, the XPS P 2p spectra in Fig. 3B can be deconvoluted into a pair of peaks, which correspond to the P 2p_{3/2} and P 2p_{1/2} of the Co─P bonds (*30*, *35*). Impressively, the peak positions of the P 2p were gradually shifted to the higher binding energy region, with the incorporation of nitrogen (Fig. 3B and fig. S7B), indicating the decreased average electron density around the P sites in N-CoP_{2}, which is probably induced by the N-P strong interaction. Moreover, the broad XPS N 1s spectrum of N-CoP_{2} can also be deconvoluted into the chemical states of N-Co and N-P (Fig. 3C and fig. S7C), suggesting that N is successfully doped into the CoP_{2} lattices.

Furthermore, synchrotron-based x-ray absorption fine structure (XAFS) spectroscopy is used to probe the localized coordination environments of the Co sites in the N-CoP_{2}. The x-ray absorption near-edge spectra (XANES) of CoP_{2} and N-CoP_{2} with standard Co foil and Co_{2}O_{3} as references are shown in fig. S8A. The pre-edge of CoP_{2} slightly shifts to the lower energy values after N doping, which suggests the increased average electron densities around the Co sites. In addition, Co L-edge XANES for surface chemical electronic state characterization is also measured using soft x-ray (fig. S8B), in which the reduced intensity of the L_{3}-edge peak of N-CoP_{2} also suggests more electron filling of the Co d orbital (*36*). This is in agreement with the XPS Co 2p and XANES Co K-edge results. The similar oscillation profiles of the extended x-ray absorption fine structure (EXAFS) analysis of *k*^{2}-weighted χ(*k*) signals (fig. S8C) indicate that the overall crystal structure of CoP_{2} is well maintained after N doping, consistent with the XRD results in Fig. 2C. Figure 3D shows the corresponding R space curves of Co after *k*^{2}[χ(*k*)]-weighted Fourier transform, where the single strong shell at around 1.78 Å originated from the Co-P vector (fig. S9A). For N-CoP_{2}, the shell becomes slightly broader, which may be attributed to the formation of a Co-N vector with very similar peak position at around 1.78 Å (fig. S9B) (*37*). Because of the slight bond length difference between Co-N and Co-P, more-refined first shell analysis of CoP_{2} and N-CoP_{2} is further carried out. Figure 3 (E and F) shows the wavelet transform (WT) contour plots of the two signals based on Morlet wavelets with optimum resolution at the first shell. Apparently, CoP_{2} has the maximum intensity at *k* = 4.95 Å^{−1}, while the maximum of N-CoP_{2} presents at *k* = 4.90 Å^{−1}. The small shift of the WT maximum mostly originated from the atomic number difference between P and N (fig. S10) (*38*). Together, XPS and XAFS analyses further demonstrate that N is substitutionally doped into the structure of CoP_{2}, which can essentially manipulate the electronic and coordination structures of CoP_{2}.

The catalytic performance for HER catalysis is evaluated in a typical three-electrode configuration with 0.5 M H_{2}SO_{4} as the electrolyte. For the sake of comparison, bare CC, CoP_{2}, and Pt/C are also examined. Figure 4A shows the linear sweep voltammetry (LSV) curves at the scan rate of 5 mV s^{−1}. Impressively, N-CoP_{2} displays the best electrocatalytic activity with an overpotential of only 38 mV at 10 mA cm^{−2}, which is substantially smaller than those of CC (458 mV) and CoP_{2} (125 mV), and even close to the performance of the benchmark Pt/C (28 mV). It also represents the best performance toward HER catalysis in acidic conditions among reported Co-based compounds (*13*, *19*, *39*). The temperature-dependent activities of N-CoP_{2} (denoted as N-CoP_{2}-*X*) with various N concentrations [N/(N + P)] quantified by XPS characterizations are also studied and shown in Fig. 4B, fig. S11, and table S2. The maximum HER activity was achieved at the temperature of 350°C with an N content of 17.1%. With further increase in the temperature and N contents, the HER activity begins to decay, which may be attributed to the unfavorable phase segregation to form CoP (figs. S5 and S12). To further probe the catalytic kinetics, Tafel plots derived from the polarization curves are provided in Fig. 4C. The measured Tafel slope for the N-CoP_{2} is 46 mV dec^{−1}, much smaller than the 73 mV dec^{−1} of the CoP_{2}, which proceeds via the Volmer-Heyrovsky mechanism with Heyrovsky step [H_{ad} + H^{+} + e^{−} → H_{2}] as the rate-determining step. To deeply evaluate the correlation of Tafel slopes and the catalytic kinetics, we investigate the hydrogen oxidization reaction (HOR) mechanism experimentally. The measured Tafel slopes of CoP_{2} and N-CoP_{2} for HOR are 207 and 341 mV dec^{−1}, respectively, which proceed with the Heyrovsky-Volmer mechanism and the Heyrovsky step [H_{2} → H_{ad} + H^{+} + e^{−}] as the rate-determining step (fig. S13 and table S3). Together, all these results consistently demonstrate N-CoP_{2} has superior HER catalytic kinetics due to the accelerated rate-determining Heyrovsky step with weakened adsorption strength between H_{ad} and the catalyst surface (*40*, *41*).

Since the surface area variation may also affect the HER activity, cyclic voltammetry (CV) studies are used to estimate the electrochemical surface areas by measuring the electrochemical double-layer capacitance (*C*_{dl}), as shown in fig. S14C. The calculated *C*_{dl} of N-CoP_{2} is 10.8 mF cm^{−2}, which is larger than the 6.1 mF cm^{−2} of CoP_{2}. However, the catalytic current of N-CoP_{2} at 50 mV is 32 times higher than that of CoP_{2}, implying the enhanced HER activity did not mainly stem from the increased surface area. To further probe the intrinsic per-site catalytic activity, turnover frequency (TOF) is plotted in Fig. 4D (*42*). Apparently, the TOF values of N-CoP_{2} are consistently larger than those of CoP_{2} in the whole studied potential region, suggesting that the catalytic surface of CoP_{2} has been essentially changed after nitrogen incorporation. Furthermore, electrochemical impedance spectroscopy (EIS) is used to explore the interfacial charge transfer kinetics on the catalytic surface. Figure 4E shows the Nyquist plots of CoP_{2} and N-CoP_{2} at 100 mV versus Reversible Hydrogen Electrode (RHE), respectively. Both the Nyquist plots present typical semicircle profiles from 100 kHz to 0.01 Hz, which can be well fitted using a simplified Randle circuit model (Fig. 4E, inset). The fitted charge transfer resistance (*R*_{ct}) for N-CoP_{2} (2 ohm) is much smaller than that of CoP_{2} (13 ohm), suggesting that N doping could accelerate the interfacial charge transfer kinetics. Last, the electrochemical stability of N-CoP_{2} is also evaluated. Figure 4F shows the chronopotentiometric curve of N-CoP_{2} at the current density of 20 mA cm^{−2}. The overpotential change (versus RHE) during the chronopotentiometric test goes from −53.2 to −64.6 mV in 30 hours. The decay mainly occurs in the first 12 hours, and then the potential becomes relatively stable. The initial decay could be attributed to the generated bubbles that cannot be efficiently released from the electrode surface. Furthermore, the SEM image and XRD pattern are also collected after the stability testing, as shown in the insets of Fig. 4F and fig. S15. Both the NW morphology and the crystal structure can be well maintained after the durability testing, further indicating the robustness of N-CoP_{2} NWs for HER catalysis.

Density functional theory (DFT) is further carried out to study the possible effects of nitrogen doping on the HER activity of CoP_{2}. Figure 5A shows the crystal structures of CoP_{2} and N-CoP_{2} with labeled lattice constants. The decreased lattice constants after N incorporation reveal the existence of remarkable lattice contraction, which stemmed from the formation of shorter and stronger N─P bonds as junctions of the octahedral units in the N-CoP_{2}. Meanwhile, the mapping of orbital wave functions in Fig. 5A illustrates the strong N-P interaction results in substantially increased atomic orbital wave function overlap integrals, especially between N and P by the σ type overlap with the decreased principle quantum number for the involved N atomic orbitals. Moreover, the more localized electron density and the decreased bond lengths in the surface models of N-CoP_{2} with various facets of (100), (001), and (010) (Fig. 5B and figs. S16 and S17) relative to those of CoP_{2} further support that the N-P interaction is much stronger than the P-P interaction. The increased atomic wave function overlap integrals spread the large energy difference between the highest and lowest orbital levels in the local band and further broaden the local energy bandwidth (*43*, *44*). Figure 5C illustrates how the energy levels and bandwidths vary with the internuclear distance of atoms in a crystalline solid, in which the shaded areas represent the energy bands formed by the valence orbitals. As the internuclear distance decreases, the collection of valence orbitals gradually broadens into bands, where the formed overlapped bands (the intermix) further broaden the bandwidth. As the bandwidth widens, the only way to maintain the number of fixed valence electrons is to shift the valence band center of CoP_{2} away from the Fermi level, which is also reflected by the density of states (DOS) with the shifted valence band center from −1.32 to −1.36 eV (Fig. 5C). According to the Newns-Anderson model that expresses the adsorption energies depend on the interactions between the catalyst valence bands and the adsorbate orbitals, the electron coupling between them gives rise to the bonding and antibonding state splitting, as illustrated in Fig. 5C. Since the wave function of high-lying antibonding states has dominant catalyst valence states characters, the downshift of the CoP_{2} hybridization valence band center will correspondingly reduce the antibonding level relative to the Fermi level (Fig. 5C and fig. S18) and consequently lead to the weak adsorption strength that originated from more electron fillings of antibonding states (fig. S19). We also study the effects of N concentration on the calculated adsorption energies of hydrogen (Δ*G*_{H*}), the Δ*G*_{H*} on the various crystal facets of N-CoP_{2} with different N concentrations are consistently much closer to neutral than those on the CoP_{2} (Fig. 5D and figs. S20 and S21). Moreover, the interplanar distances of various crystal facets of N-CoP_{2} are also consistently decreased (table S4). Typically, the Δ*G*_{H*} close to neutral is the key descriptor for HER catalysis in acidic condition. Therefore, the smaller Δ*G*_{H*} value induced by the strong N-P interaction enables N-CoP_{2} to be highly active for HER catalysis.

Since intrinsic defects may also be created during the ammonia treatment, we further theoretically and experimentally study the effects of the defects on the HER catalysis of CoP_{2}. As shown in fig. S22A, although the Δ*G*_{H*} value of the defective CoP_{2} is closer to neutral than that of CoP_{2}, it is still much inferior to that of N-CoP_{2}. Meanwhile, defects in CoP_{2} are also intentionally introduced by hydrogen treatment and experimentally evaluated for HER catalysis. Electrochemical characterization indicates that the HER activity of CoP_{2} can be improved with the introduction of defects (fig. S22B). However, considering that the performance of defective CoP_{2} (D-CoP_{2}) is still far less than that of N-CoP_{2}, it suggests that the exceptionally high HER activity of the N-CoP_{2} did not mainly stem from the intrinsic defects but the N-induced lattice contraction.

In view of the existence of P─P bonds in many P-rich TMPs, we also evaluate the feasibility of nitrogen doping for improving the HER catalysis of other P-rich TMPs including of FeP_{2}, NiP_{2}, and MoP_{2}. Figures S23 and S24 show the crystal structures and the projected density of state (PDOS) plots of FeP_{2}, NiP_{2}, MoP_{2}, and their corresponding N-doped counterparts. Similarly, all of them consistently undergo lattice contraction with increased atomic wave function overlap integrals, which consequently result in broadened energy bandwidths and the downshift of the valence band centers by the formation of N-P strong interactions. To further prove the feasibility for HER catalysis, we experimentally fabricated these P-rich metal phosphides and studied their electrochemical properties including LSV, Tafel, and stability (figs. S25 to S27). The electrochemical studies consistently indicate that the N doping can substantially improve the HER performances of FeP_{2}, NiP_{2}, and MoP_{2} with overpotentials of 97, 153, and 135 mV, respectively, at the current of 10 mA cm^{−2}. These results suggest that lattice contraction induced by the N-P strong interactions is a general strategy to boost the HER catalysis of P-rich TMPs.

In summary, we have demonstrated that the HER performance of P-rich CoP_{2} can be significantly boosted by N-induced lattice contraction. The prepared N-CoP_{2} exhibits an impressive overpotential of 38 mV at 10 mA cm^{−2}, which is very close to that of precious Pt catalysts in acidic conditions and also represents the best activity among reported Co-based catalysts. Refined structural characterization and DFT calculation consistently reveal that the created strong N-P interaction in CoP_{2} could increase the atomic wave function overlap via the lattice contraction and consequently broaden the local energy bandwidth with the downshift of the valence band center, which eventually facilitate the HER catalysis by weakening the electron coupling between CoP_{2} and H_{ad}. The lattice contraction strategy via N-P strong interactions can generally boost the HER catalysis of a variety of P-rich TMPs including CoP_{2}, FeP_{2}, NiP_{2}, and MoP_{2}, offering a new lattice engineering approach to fundamentally tuning the electronic properties of P-rich TMPs for HER catalysis and beyond.

## MATERIALS AND METHODS

### The synthesis of CoP_{2} and N-CoP_{2} NWs

CoP_{2} NWs were fabricated by the thermal phosphidation of Co(CO_{3})* _{x}*OH

*NWs. The Co(CO*

_{y}_{3})

*OH*

_{x}*NWs were first grown on CC by a conventional hydrothermal reaction (*

_{y}*33*). Typically, 1 mmol of Co(NO

_{3})

_{2}·6H

_{2}O, 5 mmol of CO(NH

_{2})

_{2}, and 2 mmol NH

_{4}F were dissolved in 20 ml of deionized water under vigorous stirring. Then, the prepared homogeneous solution was transferred into a 25-ml Teflon-lined autoclave with a piece of hydrophilic CC placed against the wall of the autoclave. Last, the reaction solution was maintained at 120°C for 4 hours to synthesize the Co(CO

_{3})

*OH*

_{x}*NWs on CC. The as-synthesized Co(CO*

_{y}_{3})

*OH*

_{x}*was washed with water and ethanol several times and lastly dried under a vacuum oven. The phosphidation treatment was conducted at 550°C for 3 hours in a tube furnace system with red phosphorus as the P source and argon gas as the carrier gas. N-doped CoP*

_{y}_{2}NWs (N-CoP

_{2}) were achieved by annealing the CoP

_{2}under ammonia condition at various temperatures (250° to 550°C with interval of 100°C) for 20 min.

### Synthesis of N-FeP_{2}, N-NiP_{2}, and N-MoP_{2}

The P-rich metal phosphides including FeP_{2}, NiP_{2}, and MoP_{2} were prepared using a similar method used for CoP_{2}. FeOOH, Ni(OH)_{2}, and MoS_{2} for the following the phosphidation treatment were synthesized using previously reported methods (*45*–*47*). FeP_{2} and NiP_{2} were achieved at the phosphidation temperature of 550°C for 3 hours, while MoP_{2} was obtained at the temperature of 800°C for 2 hours. N doping for FeP_{2}, NiP_{2}, and MoP_{2} was performed at 350°C for 30 min, 300°C for 30 min, and 550°C for 20 min, respectively, under ammonia condition.

### Material characterization

XRD was conducted on a Philips X’Pert Pro Super diffractometer (with Cu Kα, λ = 1.54182 Å). The XPS was performed at the photoemission end-station (BL10B) in the National Synchrotron Radiation Laboratory, Hefei. Field emission scanning electron microscopy was carried out on the JEOL-JSM-6700F, while the high-resolution transmission electron microscopy, HAADF-STEM, and energy-dispersive spectroscopy (EDS) mapping analyses were performed on the JEOL JEM-ARF200F TEM/STEM with a spherical aberration corrector. The XAFS spectra were collected at the 14W1 station in the Shanghai Synchrotron Radiation Facility. The collected EXAFS data were analyzed using the ATHENA program as implemented in the IFEFFIT software packages according to the standard procedures. The *k*^{2}-weighted EXAFS spectra were achieved by pre-edge background deduction and then normalized relative to the edge-jump step, and the plotting *k*-weight was 2.

### Electrochemical characterization

All the electrochemical tests were performed on a CHI 760E electrochemical workstation (CH Instruments, China) at room temperature. The HER catalysis was evaluated in a three-electrode setup with 0.5 M H_{2}SO_{4} solution as the electrolyte, a standard Ag/AgCl electrode (saturated KCl solution) as the reference electrode, and a graphite rod as the counter electrode. In the electrochemical testing, the measured potentials were calibrated with respect to RHE. The conversion equation is *E*_{(RHE)} = *E*_{(Ag/AgCl)} + 0.197 V + 0.059 × PH. The EIS was tested at the overpotential of 100 mV versus RHE, with the frequencies varying from 100 kHz to 0.01 Hz. All potentials were also corrected by eliminating the electrolyte resistances obtained from the EIS spectra. The TOF values were estimated according to the previous reported method (*48*), and the specific crystal parameters of different materials are listed in table S5. The most active sites are supposed to be P, while the Co and N sites are relatively inactive. Typically, the HER activity is the average results of various sites. Thus, for TOF calculation, we consider all the possible sites as the number of active sites, because such calculation will not overestimate the per-site activity.

### Computational details

DFT calculation was performed using the CASTEP program with ultrasoft pseudopotentials as implemented in the Materials Studios package of Accelrys Inc. (*49*). The electron exchange-correlation potential was dealt with the Perdew-Burke-Ernzerhof functional of generalized gradient approximation. The core electrons of atoms were treated using effective core potential. The smooth parts of the wave functions were expanded with a kinetic energy cutoff of 400 eV. The 5 × 5 × 5 and 2 × 2 × 1 Monkhorst-Pack mesh *k*-points were adopted for Brillouin zone sampling of bulk and surface calculations, in which the *k*-points are 63 and 2, respectively. The convergence criterions were set to 5.0 × 10^{−6} eV per atom for energy, 5.0 × 10^{−4} Å for maximum displacement, and 0.01 eV Å^{−1} for maximum force. The lattice parameters of the CoP_{2} unit cell after geometry optimization were *a* = 5.52 Å, *b* = 5.53 Å, *c* = 5.59 Å, which were comparable with the experimental data (*a* = 5.55 Å, *b* = 5.55 Å, *c* = 5.61 Å). The surfaces (001), (010), and (100) were modeled by a periodic slab repeated in a 2 by 2 by 2 surface unit cell with a vacuum region of 12 Å between the slabs along the *z* axis. The whole configuration in all the calculations was relaxed during the geometry optimizations and was carried out in the reciprocal space. The free energy of H_{ad} was determined according to the previous report (*50*). The same calculation parameters as CoP_{2} were also applied for FeP_{2}, NiP_{2}, and MoP_{2}, and the used crystal parameters of the unit cells are listed in table S6.

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/6/1/eaaw8113/DC1

Fig. S1. SEM images of Co(CO_{3})* _{x}*OH

*NWs collected with different magnifications.*

_{y}Fig. S2. The influence of ammonia treatment temperature on the morphology of N-CoP_{2}-*X* (*X* is the temperature).

Fig. S3. Structure characterizations of Co(CO_{3})* _{x}*OH

*, CoP*

_{y}_{2}, and N-CoP

_{2}.

Fig. S4. The magnified XRD patterns of CoP_{2} and N-CoP_{2}.

Fig. S5. The influence of ammonia treatment temperature on the composition of N-CoP_{2}-*X* (*X* is the temperature).

Fig. S6. Elemental composition characterization of N-CoP_{2} NWs.

Fig. S7. XPS spectra of Co 2p, P 2p, and N 1s.

Fig. S8. XAFS and XANES characterizations of CoP_{2} and N-CoP_{2}.

Fig. S9. The *k*^{2}-weighted FT-EXAFS curves of CoP_{2} and N-CoP_{2} with CoP and CoN* _{x}* as reference.

Fig. S10. WT-EXAFS of CoP and CoN* _{x}*.

Fig. S11. The electrochemical HER performances of N-CoP_{2}-*X* (*X* = 250, 350, 450, and 550) in 0.5 M H_{2}SO_{4}.

Fig. S12. The influences of N contents on the overpotentials of N-CoP_{2}-*X* (*X* = 250, 350, 450, and 550).

Fig. S13. The electrochemical HOR performances of CoP_{2} and N-CoP_{2} in 0.5 M H_{2}SO_{4}.

Fig. S14. CV curves at different scan rates and the capacitive currents as a function of scan rate in 0.5 M H_{2}SO_{4}.

Fig. S15. The XRD patterns of N-CoP_{2} before and after the durability test.

Fig. S16. The electron density differences of CoP_{2} and N-CoP_{2}.

Fig. S17. The optimized structures of CoP_{2} and N-CoP_{2} surfaces.

Fig. S18. The PDOS of CoP_{2} and N-CoP_{2} with different surfaces.

Fig. S19. The PDOS of CoP_{2} and N-CoP_{2} with the hydrogen adsorbed on different surfaces.

Fig. S20. The optimized surface models of CoP_{2} and N-CoP_{2} with hydrogen adsorbed on different surfaces.

Fig. S21. The calculated Δ*G*_{H*} on CoP_{2} and N-CoP_{2} with various N concentrations on different facets.

Fig. S22. The calculated Δ*G*_{H*} and LSV curves in 0.5 M H_{2}SO_{4} for CoP_{2}, D-CoP_{2}, and N-CoP_{2}.

Fig. S23. The optimized crystal structures of FeP_{2}/N-FeP_{2}, NiP_{2}/N-NiP_{2}, and MoP_{2}/N-MoP_{2}.

Fig. S24. The PDOS of FeP_{2}/N-FeP_{2}, NiP_{2}/N-NiP_{2}, and MoP_{2}/N-MoP_{2}.

Fig. S25. The morphology characterizations and electrochemical HER performances of FeP_{2} and N-FeP_{2}.

Fig. S26. The morphology characterizations and electrochemical HER performances of NiP_{2} and N-NiP_{2}.

Fig. S27. The morphology characterizations and electrochemical HER performances of MoP_{2} and N-MoP_{2}.

Table S1. HAADF and XRD calculated lattice contraction for (020) and (002) facets.

Table S2. N contents acquired from XPS characterization for N-CoP_{2} with various treatment temperatures.

Table S3. Tafel slopes for HOR with various mechanisms.

Table S4. The derived strain for (020) and (002) by the DFT calculation with various N contents.

Table S5. Crystallographic data of CoP_{2} and N-CoP_{2} used for calculating the number of active sites.

Table S6. Crystallographic data of FeP_{2}/N-FeP_{2}, NiP_{2}/N-NiP_{2}, and MoP_{2}/N-MoP_{2}.

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**We acknowledge the Beamline BL14W1 at Shanghai Synchrotron Radiation Facility for XAS characterizations. The numerical calculations in this paper were performed on the supercomputing system in the Supercomputing Center of University of Science and Technology of China.

**Funding:**This work was supported by the National Key Research and Development Program of China (2017YFA0206703), the Natural Science Fund of China (nos. 21771169, 11722543, and 11505187), the Fundamental Research Funds for the Central Universities (WK2060190074, WK2060190081, and WK2310000066), and the Recruitment Program of Global Expert.

**Author contributions:**G.W., Y.Q., X.L., and Y.Lin designed and supervised the project. J.C. and Y.S. conducted the project. X.Z., Y.Z., and Y.W. provided the XAFS and XPS measurements and analysis. S.N., Y.X., and Y.Liu helped in the material synthesis. G.W., X.L., J.C., and Y.S. wrote and revised the manuscript.

**Competing interests:**The authors declare that they have no competing interests.

**Data and materials availability:**All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2020 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).