1 Introduction

Nitrogen reduction reaction (NRR) performed electrochemically is regarded as a green and legitimate approach of ammonia synthesis and it has been intrinsically into limelight over the world-wide research community, not only because of the immense use of ammonia in the agriculture and transportation sector, but also due to urge to resolve the fallacies associated with the process [1,2,3]. Primarily, the eternal problem persisting with NRR is the predominance of the combative hydrogen evolution reaction (HER) at the same potential range, which overpowers NRR over most of the catalyst surfaces, resulting in poor yield and Faradaic efficiency (FE) of ammonia production. Researchers thus majorly focus on varied catalyst development, which includes several strategies: (a) Selectivity of elements that would prefer binding with N2 over protons [4,5,6], (b) Blocking the HER active sites [7], (c) Phase-selective material designing, inhibiting HER at the active surface [8, 9], (d) interface-engineering that would deviate the HER pathway inducing better Faradaic efficiency for NRR [10]. Although either 1st row transition metals [11] or semimetals [12] are regarded as more suitable candidates for NRR, a metal-free approach is rather preferred for the cost-effectiveness and simplicity of the process. Boron (B)-based electrocatalyst in this respect can act as a strong contender [12, 13]

The endless advantages of boron nitride (BN), where B serves as a Lewis acidic site and its orbital compatibility with N2, which is on the other hand a weak Lewis base appears to serve the purpose of N2 adsorption on the B units successfully. However, in order to obtain a better yield of ammonia, it is crucial to drive the forces that tend to bind N2 with B active sites that is the σ-bonding and the π-back bonding interactions that weaken the N≡N bond on the catalyst surface [14]. One probable way out to this could be doping some foreign elements in the BN architecture that would either serve as a better active site for NRR [15] or enhance the local charging effect over B to make way for the delocalization of the charges to the adsorbed N2 for the facile increment of N–N bond length and easy first protonation [16]. C-doping in BN framework is looked upon for this purpose, where some reports suggest that BN acts as a trigger while the edge C provided the active sites for NRR [17]. Contrary to this, a few reports considered B as the active centre in the BNC or B-doped C catalyst accomplishing facile N2 adsorption and reduction with a knee-high energy requirement [18, 19]. In particular, the edge B atoms having lone pair of electrons were found to be more effective to draw N2 for adsorption. However, there is a lagging in parity between theoretical and experimental findings to establish the actual active site and the importance of C in the BN framework, promoting NRR. It is more interesting to observe that in order to increase the efficiency of metal-free carbon-based catalyst, heteroatoms like O play crucial role to accumulate free charge cloud over the adjacent atoms and help in spin polarization, which in turn lower the potential for the rate determining steps of NRR [20, 21]. Thus, this concept could be rendered in BCN class of catalysts to provoke the NRR efficiency of the B active sites through charging effect, however, has not been explored.

Besides the active site, electrolytes play a parallel importance in NRR. Mostly in NRR, there is no selection rule for the choice of electrolytes. It has been seen in many cases that electrolyte ions (cations or anions) play a major role to provoke NRR [22, 23], either by suppressing HER [24] or by enhancing the local concentration of N2 in the vicinity of the electrode material [25]. However, the fact that electrolyte ions could also have some interaction with the active site is mostly unseen, as (a) This calls for a common practice to perform NRR in all the known electrolytes and (b) This requires rigorous theoretical findings. But along with the development of a suitable catalyst, the choice of electrolyte also needs thorough attention to ensure that the electrolyte ions do not offer poisoning effect on the active site.

In this work, we have insightfully focused on the above-mentioned issues of catalyst development and its preservation throughout the NRR process. Keeping in mind, the significant contribution of B towards NRR, our active catalyst BNCO(1000) was developed. It was found that the presence of C dopants and O functionalities formed an electron-rich pentagon at the edges, deviating from the regular B–N–C hexagonal units owing to which the adjacent B site encountered a better charging effect and the material experienced improved conductivity with charge cloud density accumulated near the Fermi level. This helped to improve the charge transfer efficiency from B to the adsorbed N2 reinforcing the potential determining steps of NRR. More interestingly, a series of experiments with different set of acidic electrolytes like HCl, H2SO4 and H3PO4 (varying the anionic counterpart) revealed that HCl is a better competent for NRR on B active site yielding 211.5 μg h−1 mgcat−1 NH3 and with a FE of 34.7% at − 0.1 V vs RHE. H2SO4 and H3PO4 caused a crowding effect because of the bulkiness of anions hindering the passage of N2 and also bound with the B site through O end (SO42− and PO43− serving as better Lewis bases than N2), partly poisoning the active site. This study thus brings to the fore the importance of catalyst development as well as selectivity of electrolyte for an unperturbed and high yield of ammonia.

2 Experimental and Calculations

2.1 Material Synthesis

This work concerns the synthesis of the active material by a two-step pyrolysis method. Primarily, melamine and boric acid were taken as precursors of C, N, O and B in 1:2 weight ratio. After stirring the mixture in ethanol, it was dried overnight and the resultant powder was pyrolyzed at 550 °C followed by 1000 °C (3 °C min−1) for 2 h. Thereafter, the obtained black powder was subsequently washed thoroughly with distilled water and ethanol and dried in hot air oven at 70 °C to obtain oxygen edge-functionalized boron-carbonitride framework (BNCO(1000)). The other control samples were obtained at a different pyrolysis temperatures of 800, 900, and 1100 °C named as BNCO(800), BNCO(900), and BNCO(1100), respectively, while maintaining the ratio of melamine and boric acid as 1:2. In order to establish the importance of B as an active site for NRR, only melamine was pyrolyzed at 1000 °C at 2 °C min−1 to obtain NC. In addition to this, to foreplay the effect of C doping, pristine BN was synthesized using boric acid and urea by pyrolyzing the precursors at 1000 °C for 5 h [26].

2.2 Electrochemical Measurements

All the electrochemical characterizations involved in this work were carried out in an H-shaped electrolysis cell, where the cathodic and anodic compartments were separated by Nafion (115) membrane. This membrane allows permeability of protons from one chamber to the other and is non-selective to any other ions. The Nafion membrane was precleaned in 5 wt% H2O2 aqueous solution at 80 °C for 1 h followed by rinsing in ultrapure water at 80 °C for next 1 h [27]. All the measurements were ambiently taken at room temperature in an ideal three-electrode condition with Pt wire, Ag/AgCl (3 M KCl) and BNCO(1000) modified GCE taken as the counter, reference and working electrodes, respectively. The cell chambers were immersed with 45 mL of the working electrolytes. The potentials for the reference electrode were related to the reversible hydrogen electrode (RHE) by Eq. 1 as follows:

$$E_{{{\text{RHE}}}} = E_{{{\text{Ag}}/{\text{AgCl}}}} + \, \left( {0.0{591 } \times {\text{ pH}}} \right) \, + \, 0.{21}0 \, (E^{0} {\text{at Ag}}/{\text{AgCl}},{\text{ 3 M KCl}})$$

Prior to each electrolysis, the electrolyte in the cathode compartment was continuously fed with pure Ar and N2 (99.99% purity) gases for 30 min each using properly positioned spargers so that the cathode could sufficiently get access to the gas bubbles. To ensure that pure N2 gas was fed into the electrolyte, it was passed subsequently through 0.05 M H2SO4 (acid trap) and 0.1 M KOH (base trap) for extracting any adventitious NH3 or NOx present in the gas. All presented polarization curves were steady-state ones after 10 cycles and were measured at 10 mV s−1 scan rate and the current density values were normalized to geometric surface areas (0.07 cm2). Chronoamperometric (CA) tests were conducted in the N2-fed 0.1 M HCl solution for 2 h over the potential range from 0.0 to –0.4 V vs RHE. After each CA tests, measured amount of aliquot was taken out from the electrolyte and studied by indophenol blue and Watt and Chrisp methods for the qualitative detection of ammonia and hydrazine, respectively. For comparative study, 1H-NMR was also performed with the concentrated electrolyte solutions.

2.3 Detection Methods of Ammonia and Hydrazine

Ammonia was detected following the conventional Indophenol Blue method with slight modifications. 5 mL of the aliquot solution was taken and added to 2 mL of 10 mg mL−1 Phenol solution in ethanol, followed by 0.2 mL of 0.5 wt% of C5FeN6Na2O (sodium nitroferricyanide) in water. The resulting solution was added with NaOH solution containing trisodium citrate as buffer, till the pH reached above 9. Finally, 0.1 mL of NaClO was added and the solution mixture was stored in dark for 2 h before UV–visible spectroscopic analysis at ~ 630 nm. The concentration of ammonia evolved in the reduction process was determined by a calibration plot (concentration vs absorbance) obtained from a set of solutions containing a known concentration of NH4Cl in 0.1 M HCl. To each of these solutions, the above-mentioned reagents were added and their absorbance was measured after a 2 h incubation time. The concentration of the produced NH3 was deduced following the equation y = 0.2523 x + 0.0508.

For hydrazine detection, the indicator solution contained 0.6 g of para-(dimethylamino) benzaldehyde in 30 mL absolute ethanol and 3 mL concentrated HCl (35%). 2 mL of this colour agent was mixed to same volume of the electrolyte solution and incubated in dark for 15 min before performing the UV–visible spectroscopic characterization. A set of solutions with known concentration of N2H4 in 0.1 M HCl was used as a calibration standard and their absorbance was measured at λ = 460 nm.

2.4 Activity Descriptors

The NH3 yield rate (RNH3), normalized to mass, given by μg h−1 mgcat−1 can be calculated using Eq. 2, where C is the measured NH3 concentration (μg mL−1), V is the volume of the catholyte (mL), t is the electrolysis time (h), and mgcat is the mass of the catalyst loaded on the electrode surface.

$$R = \frac{C \times V}{{t \times {\text{mg}}_{{{\text{cat}}}} }}$$

The Faradaic efficiency (FE) is calculated using Eq. 3, where 3 is the number of electrons necessary to produce one NH3 molecule, F is the Faraday constant (96,485 C mol−1), M is the relative molar mass of NH3 (M = 17 g mol−1), and the Q is the total charge passed through the electrodes (C).

$${\text{FE}} = \frac{3 \times F \times C \times V}{{M \times Q}}$$

The mass-normalized production rate of NH3 (mmol h−1 gcat−1) was calculated as Eq. 4 below:

$${\text{Production rate}}_{{{\text{mass}}}} = \frac{C \times V}{{M \times t \times g_{{cat^{ - 1} }} }}$$

2.5 Quantification of NH3 Concentration from NMR

The catholyte solution was concentrated to 1 mL and 400 μL was taken out of it for NMR analysis. This was subsequently added with 50 μL of 0.01 M maleic acid solution followed by DMSO-d6 and subjected to 1H-NMR study. The obtained peaks were integrated and by using the following Eq. 5, the concentration of NH3 was quantified and matched with that obtained from UV–visible spectroscopic method.

$$\frac{{I_{{{\text{sample}}}} }}{{I_{{{\text{standard}}}} }} = \frac{{H_{{{\text{sample}}}} \times C_{{{\text{sample}}}} }}{{H_{{{\text{standard}}}} \times C_{{{\text{standard}}}} }}$$

where I stands for the integral values, H stands for the number of protons (4 in case of sample NH4+ and 2 in case of the vinylic protons of maleic acid) and C stands for the concentrations of the sample and standard (0.01 M for maleic acid).

2.6 Electrochemical Active Surface Area of Catalysts

The electrochemical active surface area (ECSA) of the catalysts was evaluated from the following Eq. 6:

$$A_{{{\text{ECSA}}}} = \frac{{C_{dl} }}{{40 \mu F cm^{ - 2} }} cm^{2}$$

where Cdl represents the double layer capacitance and a commonly used specific capacitance (Csp) value of 40 µF cm−2 was used [28, 29].

2.7 Density-Functional Theory (DFT) Calculations

First-principles-based DFT calculations are performed using plane-wave technique implemented in the Vienna Ab initio Simulation Package (VASP) [30]. Projected Augmented Wave (PAW) pseudopotentials are used to define the core electrons [31]. The Generalized Gradient Approximation (GGA) proposed by Perdew, Burke and Ernzerhof is employed to describe electron exchange–correlation interactions [32]. An optimised value of cut-off energy of 450 eV through convergence test is used in the plane-wave basis set. The energy convergence criteria are set to be 10–5 eV for electronic self-consistent loop and 10–4 eV for ionic relaxation loop. The Brillouin zone sampling within Monkhorst pack scheme is obtained using the 1 × 5 × 1 K-point grid. The vacuum of 20 Å is considered in X and Z directions to avoid the interaction between repeating images.

In nitrogen reduction reaction, the electrochemical activity and reaction mechanism on the catalysts can be estimated by plotting the Free Energy profile. For this, the Gibbs free energies (G) of each reaction steps are calculated by using Eq. 7,

$$G = E + {\text{ZPE}}{-}{\text{TS}} - {\text{neU}},$$

where E is the DFT energy, n is the number of electrons and U is the applied potential at the electrode [33], which are provided in the table below for the free molecules like H2, NH3 and N2. (Table 1).

Table 1 The DFT energies, entropy terms and zero-point energies for free molecules

3 Results and Discussion

3.1 Energy Optimized Structure and Electronic States of the Catalysts

Boron atom has gained immense popularity in terms of facile adsorption interaction with N2 atoms, owing to the symmetry in their orbital energy. Besides this, B is also known to impart stability to the key intermediates of NRR via a charge balance mechanism [34]. However, in order to make NRR more thermodynamically feasible, a driving force is inevitable, which would account for an enhancement in the charge transfer efficiency of the B active centre to the adsorbed N2. The material is expected to become more electronically active, provided the electronic states near its Fermi level is more populated that in turn reinforces the material conductivity [35]. This could be operative in presence of foreign dopants and not only that a better charge density near the Fermi level helps in enhanced N2 adsorption and weak binding of the key intermediates of NRR, thereby uplifting the NRR kinetics energetically [36]. In this realm, it was important to realize the correlation between the local charging effect over active B site and its impact on the NRR performance and hence for this work, three energy optimized model structures for pristine BN, BNC, and BNCO were formulated as shown in Fig. 1a-c. Through density of states study, we found that the BNC and BNCO systems became more conductive with large electronic states near Fermi level due to C and O units as compared to BN (Fig. 1d-f) and accordingly we approached to synthesize our desired active material BNCO(1000) along with all the necessary control samples, required to justify the motive of this work.

Fig. 1
figure 1

Optimised model structures of a BN, b BNC, and c BNCO systems. The N, C, O, B atoms are denoted with blue, wine, red, green colour spheres, respectively. Plot of Density of States for d BN, e BNC, f BNCO systems. The vertical dotted line at zero represents the Fermi Level

3.2 Structural Illustration and Formation Mechanism of the Catalyst

The synthesis of the active material initiated with mechanical stirring of the precursors, melamine and boric acid at 65 °C in ethanol, where an inevitable H-bonding between the two moieties enable the formation of a single-sourced co-crystal for the synthesis of boron carbonitride framework [37]. Nevertheless, it is important to mention the significance of the two-step pyrolysis process towards NRR activity of the material. At 550 °C, a condensation reaction would eliminate H2O and NH3 from the precursor and an irregular architecture of boron nitride and carbon-nitride is expected to form. However, as boric acid is taken in excess, there persists a possibility of further inter-molecular H-bonding at the edges as depicted in Fig. 2a. Beyond 550 °C, the B(OH)3 units get converted to B2O3, which further take part in the high temperature pyrolysis step to deliver our final active catalyst, oxygen edge-functionalized boron-carbonitride (BNCO(1000)). So, the structural disintegration followed by elemental re-organization of the precursors led to the formation of boron carbonitride architecture with well-defined boron active sites per hexagon unit and islands of edge pentagons containing O functionality. The synthesis method and the probable mechanism has been schematically elaborated in Fig. 2a.

Fig. 2
figure 2

a Schematic representation of the probable mechanism of BNCO(1000) catalyst synthesis by pyrolysis method. b FESEM image of BNCO(1000) catalyst (scale-bar: 100 nm). c High resolution TEM image of BNCO(1000) catalyst (scale bar: 10 nm). d XRD of all the synthesized catalysts. e FTIR spectra of all the as-synthesized catalysts

3.3 Morphology and Structural Characterization

The field emission scanning electron microscopy (FESEM) image in G = E + ZPE–TS-neU, Fig. 2b presents that the catalyst resembled a hardened granular morphology, which could be attributed to the crosslinking effect of the intramolecular boronic acid and melem moieties forming the BNCO(1000) active material [38]. The irregularly organized lattice fringes in the high-resolution transmission electron microscopy (HRTEM) image in Fig. 2c depicted the crystalline nature of the material that could be also evident from the selected area electron diffraction (SAED) pattern (Fig. S1). The elemental composition of the BNCO(1000) catalyst was verified by means of FESEM mapping, where Fig. S2 evidences the presence of B, N, C, and O atoms. The X-ray diffraction (XRD) pattern of all the synthesized materials was consistent with that obtained for C-doped BN type of material architecture (Fig. 2d) [39]. The characteristic peaks located at 2θ of 26 and 43° could be ascribed to the (002) and (100) planes of BCN [40,41,42]. The slight shifting in the (100) plane to a lower angle from the XRD spectrum of pristine BN originated from the planar strains that could have developed due to the C doping and O edge-functionalization [43, 44]. This necessitated the establishment of the elemental bonds constituting the catalysts, which was verified from Fourier-transform infrared (FTIR) spectroscopy. As demonstrated in several reports, the formation of BN architecture occurs at a temperature of 900 °C and above, the nature of the FTIR spectra for the catalysts BNCO(900), BNCO(1000), and BNCO(1100) was consistent with that obtained for BN with the signature vibrations appearing at 1345 and 761 cm−1 for B–N stretching and B–N–B bond, respectively, as shown in Fig. 2e [39, 45, 46]. The other peaks corresponding to B–C, C–N [47], B–O–C, C=O, and C=N bonds could also be seen from the stretches in between 900 and 1400, ~ 1800, and 2100 cm−1, respectively. The chemical bonding environment within the BNCO(1000) catalyst was further determined by X-ray photoelectron spectroscopy (XPS). A comparative XPS study of all the catalysts has been provided to have a clear vision of the formation of our active catalyst. The survey spectra in Fig. S3 showed the presence of all the corresponding elements B, C, N, and O in the as-prepared samples. The high resolution B 1s spectra in Fig. 3a evidence the gradual formation of the C-doped BN structure with C–B–N peak at 190.73 eV [48], along with the lowering in the integral peak area of B–O (at 192 eV) [18, 46] with the gradual rise in temperature from 800 to 1000 °C. At 1100 °C, the B–O peak disappeared along with the emergence of a small peak at 188 eV corresponding to B–C bond. The deconvoluted peaks appeared identical for the BNCO(1000) as well as pristine BN samples in Fig. 3b, where the peak corresponding to B–O could be reasonably from the O edge-functionalization of the B centres. Likewise, in the N 1s narrow spectra in Fig. 3c, the peak corresponding to N–C at 399.58 eV appeared to be rather broadened in the sample formed at 800 °C along with the presence of N-B bonding characteristic at 398.15 eV. It could be expected that at this temperature, a disordered structure was formed which eventually got reorganized at a temperature of 900 to 1100 °C, where a gradual increment in the N–B peak intensity could be observed with a simultaneous lowering of the N–C peak intensity. The greater number of B–N pairs manifested greater number of active sites at 1000 °C, beneficial for NRR [18]. However, although it appeared that the N–B peak got even more intense in case of 1100 °C, the relative elemental content of this material BNCO(1100) revealed a lowering in the B and N atomic percentage with simultaneous rise in the C content of the material as tabulated in Table S1. In case of pristine NC, pyridinic N, pyrrolic N and N-oxides could be seen from the peaks at 397.9, 400.3, and 403.9 eV, respectively, in Fig. 3d [49], while for pristine BN, peaks corresponding to N–B and N–O could be evidenced at 398.8 and 400.2 eV, respectively. The N–B peak in the final material was found to be shifted to a lower binding energy by 0.6 eV, which could be attributed to the disorderness in the structure due to foreign dopants like C and O. In the high-resolution C 1s spectra in Fig. 3e, a sharp fall in the C–B peak intensity could be seen with rise in pyrolysis temperature from 800 to 1000 °C, which was an indication for the formation of more BN motifs with repetitive C doping per hexagonal unit of BN, consistent with that obtained in N 1s spectrum [41]. But due to rise in the C content with further rise in temperature to 1100 °C, assumingly there occurred a structural disruption from the regular C-doped BN framework and an increase in the extent of graphitization enhanced the C content in the material with emergence of a broad C–B bond in the C 1s spectrum. In the B 1s spectrum, for 1100 °C material, there was appearance of a new peak corresponding to B–C, besides the conventional C–B–N peak, corroborating our finding from the C 1s spectra. However, the appearance of C–O peak also indicated the presence of O functionalization at the edges of all the synthesized catalysts (Fig. 3e-f). It is not surprising that the high resolution O 1s spectra in Fig. S4 disclosed the same conclusion drawn from the B 1s and C 1s spectra regarding the B–O and C–O bonds, though it was found that the O content gradually diminished at higher pyrolysis temperature (Table S1).

Fig. 3
figure 3

Comparative narrow XPS spectra of all the catalysts at a, b B 1s, c, d N 1s, e, f C 1s edges. NEXAFS spectra of BNCO(1000) catalyst at g B K-edge, h N K-edge, and i C K-edge

In order to have some insightful idea about the local electronic structures of the BNCO(1000) material, near-edge X-ray absorption fine structure spectroscopy (NEXAFS) was employed. Basically, in NEXFAS technique, a core level electron is excited to a partially unoccupied higher orbital level and hence the spectra obtained from NEXAFS is directly associated with the nature of the unoccupied orbital states. The B 1s NEXAFS (Fig. 3g) spectrum showed a characteristic sharp peak at 190.67 eV for the B 1s π* transition, which could be designated to the sp2 hybridized, planar edge B atoms [50]. The three resonances at 197.02, 198.48, and 203.2 eV (represented as δ1, δ2, and δ3) were attributed to the σ* excitations, where the former two involved antibonding interactions between N 2s and B 2pxy orbitals, while the later represented second harmonic interaction between N 2pxy and B 2pxy orbitals [51]. These stretches resembled that of h-BN [52]. The shoulder peaks at ~ 192.6 eV were attributed to the B–O motifs, possibly originating from the unreacted boron oxides, as complied with the XPS narrow spectrum for B 1s [38]. The traces of B–O units were also evident from the O 1s NEXAFS as shown in Fig. S5 [53]. In all of the cases, a negative shift could be observed in the binding energies for our material BNCO(1000) than that reported for pristine h-BN, which was due to some tensile strain due to the C doping effect, that affected the intraplanar local structure. For the N 1s NEXAFS in Fig. 3h, the peak at 402.8 eV denoted the π* resonance while the broadened peaks at 409.7 eV (δ1) and 417.6 eV (δ2) were attributed to the σ* features and the formation of C–B–N bond [54]. The slight shift in the π* peak position was due to the fact that N, being more electronegative imposed a more polarization effect on the B–N bond in BNCO(1000) system that likely impacted the binding energies of the participating bonding electrons [52, 55]. The C 1s NEXAFS spectrum in Fig. 3i evidenced the presence of two distinguishable peaks at 285.2 (π*) and 292.6 (δ*) eV for the 1s to π* and 1s to σ* resonances of the sp2 hybridized C, respectively [56]. All of the above-mentioned characterizations provide ample evidence for the formation of distinct C-doped BN moiety with O functionalization at the edges, where BNCO(1000) catalyst serves as a potent candidate for NRR. The electronegativity of O and the charging effect between C–B–N unit combats the potential intensive steps of NRR and bring about facile ammonia production as discussed in the later section.

3.4 Electrochemical NRR Performance: Role of Electrolyte Anions and B-active Units for Improved NRR Kinetics

The lone pair of electrons over nitrogen brings about a weak Lewis basicity in the N2 molecules, while the Lewis acidic nature of the B atom makes it a suitable candidate for N2 adsorption [18]. In order to facilitate the protonation of the adsorbed N2 molecules, it is necessary to maintain a proton sufficiency in the medium. This makes the use of acidic electrolyte an optimum choice for NRR [57,58,59]. In fact, acidic electrolyte acts as a proper trap to capture all the converted ammonia in form of NH4+. Thus, for this work, primarily three acidic electrolytes were considered for NRR that, is, 0.1 M HCl, 0.1 M H2SO4 and 0.1 M H3PO4. The comparative linear sweep voltammetry (LSV) curves of the active material BNCO(1000) in N2 purged condition (Fig. S6) displayed a better NRR onset potential for H3PO4, though performance-wise HCl stood as a better competent. A fair explanation to this could be the better adsorption and binding probability of N2 by phosphate radicals (PO43−-N2), which increases the N–N bond length to a greater extent as compared to SO42− and Cl, as shown in Fig. S7. Moreover, from chemistry point of view, P and N being same group elements, their 3p-2p overlap leads to an enhanced interaction which helps to bring N2 into the solid–liquid-gas interface and initiate NRR at a lower overpotential. The NRR activity was also reasonably good for both H3PO4 and H2SO4 as obtained from the chronoamperometric scans over a wide-ranging potential window and verified from UV–visible spectra of the colorimetric detection of NH3 (Indophenol-blue method) in Figs. S8 and S9. But considering the proton donating ability of HCl, a stronger acid than H2SO4 and H3PO4, the NRR performance exceeded the latter two as shown in Figs. S10 and 4a. More importantly, the bulky anions SO42− and PO43− led to a crowding effect and blocked the B active sites by binding with B through O end (Lewis acid–base interaction). The thermodynamic favourability of this phenomenon as shown in Fig. S11 hindered the smooth pathway for N2 adsorption over the B active sites in case of H2SO4 and H3PO4. The theoretical results revealed that a greater charging interaction was induced from B to PO4 than SO4 and is the lowest for Cl anion in Fig. S12, which accorded with the NRR activity trend found experimentally (Fig. 4a). Table S2 provides a summary of the NRR performance of BNCO(1000) catalyst in the three above-mentioned electrolytes. However, it is important to secure the B active centres in order to get an uninterrupted NRR activity. Thus, 0.1 M HCl was considered to have an optimum acidity and anion effect to persuade facile NRR and was taken as the working electrolyte for all the electrochemical studies. It is noteworthy to mention that in all the above cases, there was no perturbation from side product formation (hydrazine) as shown in Fig. S13. In all cases, the concentration of NH3 and N2H4 (side product) was calculated from the UV–visible calibration curves obtained from the respective Indophenol-blue and Watt and Chrisp methods (Figs. S14-S17). Nevertheless, for an elaborate NRR study of our active material in 0.1 M HCl, the LSV polarization curves were produced at 10 mV s−1 scan rate in an ideal three-electrode system, where a notable difference in current densities could be observed in Ar and N2 fed electrolyte conditions (Fig. S18). It is important to mention that all the potentials referred in this work are calibrated with respect to reversible hydrogen electrode (RHE), following Eq. 1. Considering the working potential range from 0 to − 0.4 V in case of 0.1 M HCl, potential-dependent scans were taken, holding each potential for 2 h time. It was observed in Fig. 4b that the highest yield of ammonia was obtained to be 211.5 μg h−1 mgcat−1 at − 0.1 V with a FE of 34.7% and 12.44 mmol h−1 gcat−1 mass-normalized ammonia production rate, calculated from Eqs. 24. According to the best of our perception, this is the highest reported yield of ammonia on boron nitride or boron-carbonitride class of materials (Fig. 4c), where B actively served as the unit for N2 adsorption and subsequent reduction as shown in Table S3 [17, 18, 29, 51, 60,61,62,63,64]. The high production of ammonia was further verified from the isotope labelling experiment, where distinguishable triplet and doublet 1H NMR signals with coupling constant values of 52 and 72 Hz, respectively, were evident for 14NH4+ and 15NH4+, while there was no signal in case of Ar saturated condition of electrocatalysis (Fig. 4d). More convincing evidence to the production of ammonia was provided by the quantitative analysis with maleic acid using Eq. 5, where from the yield and Faradaic efficiency of ammonia was calculated and cross verified to be almost similar with both 14N2 and 15N2 feeding gases (Figs. S19 and 4e).

Fig. 4
figure 4

a NRR performance of BNCO(1000) catalyst in different electrolyte conditions (0.1 M HCl, 0.1 M H2SO4 and 0.1 M H3PO4). b Comparative plot showing yield and FE of NH3 synthesis over the wide-ranging potential window for BNCO(1000) catalyst in 0.1 M HCl. c Yield of ammonia with respect to potential of our work, compared with all the BN or BNC class of catalysts reported so far for NRR. d Isotope labelling experiment displaying 1H NMR spectra obtained after NRR in 0.1 M HCl with Ar, 14N2 and 15N2 feeding gases. e Comparison of ammonia yield and Faradaic efficiency, quantified by NMR method with 14N2 and 15N2 feeding gases with BNCO(1000) catalyst

Boron is well known to have a proper orbital compatibility with N2 that plays a significant role to lower down the free energy requirement for N2 adsorption [65]. Particularly, the B atoms at the edges with were found to be active for N2 adsorption [16]. As schematically shown in Fig. 5a, the unoccupied sp2 hybrid orbital of B took away the electron density from the highest occupied molecular orbital- σ (HOMO) of N2 and in turn donated the π-electron cloud into the lowest unoccupied molecular orbital-π* (LUMO) of N2 from the filled 2pz orbital of B via back-bonding. This interaction induced the N≡N bond weakening and brought about facile first protonation, which is the so-called “potential determining step” of NRR on B active sites. While the role of B active unit was evident from the insignificant NRR performance in NC with NH3 yield to be 29.83 μg h−1 mgcat−1, the presence of C had profound role in proliferating the NH3 yield rate and Faradaic efficiency than pristine BN (Fig. 5b-d). Interestingly, as proper BN architecture was expected to form at a temperature of 900 °C and above, the BNCO catalysts (BNCO(900) and BNCO(1000)) formed at this high pyrolysis temperature displayed better performance (NH3 yield for BNCO(900) 164.3 μg h−1 mgcat−1, while for BNCO(1000), the yield was 211.5 μg h−1 mgcat−1) as compared to BN and BNCO(800) (NH3 yield for BN 86.4 μg h−1 mgcat−1, while for BNCO(800), the yield was found to be 32.38 μg h−1 mgcat−1). However, the catalyst synthesized at 1100 °C (BNCO(1100)) slightly lagged in performance, which could be attributed to the loss of B active sites as shown from the lowered B content in the relative atomic % of the material from XPS analysis (NH3 yield for BNCO(1100) 161.02 μg h−1 mgcat−1). The performances of all the catalysts in terms of current density, NRR onset potential, ammonia yield, production rate and Faradaic efficiency are summarized in Figs. S20-S22, 5b-d and Table S4. Blessing of the optimized synthesis conditions, our final material BNCO(1000) yielded 211.5 μg h−1 mgcat−1 ammonia synthesis with 34.7% Faradaic efficiency. The electrochemical active surface area (ECSA) had a direct co-relation with the electrocatalytic activity, and the results obtained for all our catalysts were absolutely in congruence with the NRR performances of the materials. The ECSA of the catalysts were evaluated by taking cyclic voltammetry (CV) at varied scan rates as shown in Fig. S23a-f. A plot of Δj = (jajc) against the scan rate was linearly fitted in order to obtain the slope corresponding to twice the double layer capacitance (Cdl) of the materials (Fig. S24). Thereafter using Eq. 6 and as shown in Table S5, the maximum ECSA was obtained for BNCO(1000), owing to which it displayed maximum potency towards NRR.

Fig. 5
figure 5

a Energy optimized structures of the BNCO(1000) catalyst with N2 adsorbed on the edge B site and the molecular orbital interaction between B and ad-N2. Comparison in NRR performance of all the synthesized catalysts in 0.1 M HCl at -0.1 V vs RHE in terms of b yield of NH3, c mass-normalized production rate and d Faradaic efficiency

3.5 Mechanism of the Active Material Towards NRR from DFT Point of View

Theoretical analysis was carried out to unveil the role of carbon and oxygen towards improvement in NRR activity in BN systems. It is known that boron site is more promising active site to adsorb N2 for eNRR as compared to nitrogen sites [16]. Therefore, we considered the single boron site at the edge (adjacent to the CO group in Fig. 1c) in all three models to investigate the NRR mechanism. Firstly, we performed the N2 adsorption study on boron site of these three models. We found that the end-on configuration of N2 adsorption is more favourable with lower free energy (Eq. 7) than side-on configuration on boron site [16]. Therefore, the alternating and distal pathways could only occur towards NRR, whereas the enzymatic or mixed mechanisms were not feasible. Despite the importance of B in NRR, the pivot of this work was to reinforce the local charging effect over B to facilitate the charge transportation from B to N2, which was successfully accomplished by the presence of foreign dopants like C and O. Through charge density difference analysis and Bader charge study, the adsorption of N2 on boron site in various models (Fig. S25) were investigated. In case of pristine BN in Fig. 6a-b, a lowered charge transfer from B to N2 was evidenced (0.09e), which in turn resulted in a lower N≡N bond cleavage tendency and greater overpotential of PDS (ΔGN2 – ΔGNNH = 1.4 eV) for NRR. In the full free energy profile, we observed the lower value of free energy of NHNH step compare to the NNH2 step that prefers the alternating pathway over the distal pathway [66,67,68]. Further, the systems BNC and BNCO also showed a same PDS (ΔGN2 – ΔGNNH) and alternating pathway for NRR. However, in the presence of carbon, the edge C atoms had a propagating effect on the B active units that resulted in enhanced charge transfer (from 0.09e in case of pristine BN to 0.22e in BCN) from B to N2, reinforcing N2 adsorption at a much-reduced overpotential (from 1.4 to 0.89 eV) (Fig. 6c-d). Furthermore, edge-functionalized oxygen atom with carbon atoms formed the stable pentagon ring that made the carbon-boron bond weaker and the boron site became more active to adsorb N2 strongly. Therefore, this pentagon ring behaved as an electron reservoir to enrich the local electron density over B such that an enhancement of charge transfer (0.26e) could be evident from B to adsorbed N2 with lowering of the N2 reduction overpotential to 0.7 eV (Fig. 6e-f). The N2 activation is dependent on its bond length after adsorption, where BNCO system shows enhanced N2 activation due to higher bond length of adsorbed N2 as follows, 1.13 Å (BNCO) > 1.12 Å (BNC) > 1.11 Å (BN). Thus, the charging effect and importance of O functionalization along with C dopants could be established for the emerging BN class of materials for NRR.

Fig. 6
figure 6

Charge density difference analysis for a pristine BN, c BNC, and e BNCO systems. Yellow and blue lobes indicate electron accumulation and depletion, respectively (Iso-surface value = 0.001 e Å−3). The arrow and value indicate amount of Bader charge transferred. Free energy profile for NRR for b BN, d BNC, f BNCO

To understand the effect HER on NRR theoretically, we performed the hydrogen adsorption calculation on the boron active site of BNCO system. In the comparison of free energy profile, we find that the NRR is more dominant on HER due to two reasons, (i) Higher N2 adsorption energy (− 0.86 eV) than hydrogen adsorption (− 0.77 eV) on boron site, (ii) Lower value of NRR overpotential (0.7 V) than HER overpotential (0.77 V) (Fig. S26). Therefore, the BNCO catalyst is more favourable for NRR by supressing competitive HER.

3.6 Cyclability and Stability Studies of BNCO(1000) Catalyst

The viability of the catalyst (BNCO(1000)) performance was ensured from repetitive cyclability measurements, holding − 0.1 V vs RHE for 2 h, per cycle (Fig. S27a). It was interesting to found that the overlying UV–visible spectra in Fig. S27b produced similar concentration of ammonia. The post-cycling 11B and 13C NMR studies for the electrolyte (0.1 M HCl) were performed to verify whether the catalyst was dissolved in the medium in due course of the reaction. Keeping in mind the natural abundance of these isotopes and the concentration of material that could have dissolved in the electrolyte, 8000 scans and 6000 scans were applied prior to 13C and 11B NMR measurements, respectively. As can be seen from Fig. S28a, the 13C NMR spectrum displayed only one peak corresponding to the solvent DMSO-d6. There was no peak corresponding to the material (BNCO(1000)) either in 13C or 11B (Fig. S28b) NMR data, which certainly ensured that the material was not soluble in the electrolyte and the partial deactivation of the active site could be possibly responsible for the minimal drop in Faradaic efficiency, while there was a harmony in the yield of NH3 produced during each of the five chronoamperometric cycles (Fig. 7a). Besides, the isotope labelling experiment, several control experiments like (a) At − 0.1 V vs RHE in Ar purged condition and (b) At open circuit potential (OCP) in N2 purged electrolyte (Fig. S29), negligible yield of ammonia further confirmed the authenticity of ammonia production, chiefly from the feeding gas (Fig. 7b). In case of N-containing samples, it becomes imperative to show that the catalyst N had no interference in the conversion to N to ammonia. Although, from isotope labelling experiment, the source of the ammonia obtained in the catholyte was verified to be from the feeding gas, a prolonged stability experiment was run to further check the stability and efficiency of the catalyst. After a chronoamperometric run of 48 h at − 0.1 V vs RHE under continuous N2 purging (Fig. 7c), there was only a trivial loss in the yield rate of ammonia as evident from the inset of Fig. 7c. This proved that the catalyst was efficient enough to be used for a prolonged time in the N2 purged electrolyte condition under a continuous − 0.1 V potential. The after stability FTIR spectra (Fig. S30) of the catalyst displayed identical stretching vibrations of the elemental bonds present in the BNCO(1000) material as that in the fresh sample. In fact, XPS full survey spectra of the material revealed similar percentage of elemental content as the fresh sample, particularly that of N (Fig. 7d, inset shows the bar diagram of the elemental% of fresh and used material BNCO(1000)). More vividly, the narrow spectrum of B 1s, C 1s, and N 1s also showed similar integral areas of the deconvoluted peaks as shown in Fig. S31a-c and Table S6. Thus, this material proved to possess enough potential to be used as a metal-free electrocatalyst with target-specific, charge polarized and electrolyte-secured edge B active centres for NRR in 0.1 M HCl.

Fig. 7
figure 7

a Yield of NH3 and FE of ammonia production on BNCO(1000) catalyst after cycling experiments, holding − 0.1 V vs RHE for 2 h for each cycle. b Comparative bar plot of yield of NH3 in N2 and Ar, at − 0.1 V and in N2 at OCP for BNCO(1000) catalyst (2 h chronoamperometric test). c Stability of BNCO(1000) catalyst for 48 h at − 0.1 V, inset showing NH3 yield after 2 h and 48 h. d Before and after stability comparison of XPS full survey spectra of BNCO(1000) catalyst, inset shows the bar diagram of the atomic % of B, N, C, and O for fresh and after-stability samples

4 Conclusions

In summary, this work displayed the significant role of O and C doping within BN architecture to promote NRR on the edge B sites via associative alternating mechanism. The gradual formation of the ideal structure was systematically studied by means of XPS and the electronic properties were investigated from NEXAFS. A greater impact was found on the charging effect of B centres due to O-functionalized edges that induced a greater charge density from B to the adsorbed N2, overcoming the potential determining steps for NRR. This work simultaneously highlighted the importance of choice of electrolyte, where in 0.1 M HCl our catalyst BNCO(1000) yielded 211.5 μg h−1 mgcat−1 of ammonia at − 0.1 V vs RHE with a FE of 34.7%. It was experimentally found and theoretically supported that the bulky anions in H2SO4 and H3PO4 blocked the B active sites by a Lewis acid–base interaction between the B sites and the O ends of the anions, hence not suitable for this class of materials. Thus, our present work offered an overall idea of catalyst designing and the importance of medium to retain a high and consistent NRR performance.