Introduction

Controlled chemical bond formation is a cornerstone of modern chemical synthesis, as it allows for the precise construction of complex molecules with desired properties. The ability to selectively form and break bonds for precise synthesis of targeted chemicals under mild conditions has far-reaching implications for fields like pharmaceuticals, where product purity, efficiency, and cost are critical. Common approaches for bond formation include photocatalysis1,2, thermocatalysis3,4, and electrocatalysis5,6. Among these, electrocatalytic bond formation stands out owing to its mild reaction conditions, eco-friendly nature, and high selectivity7,8. Additionally, it allows fine-tuned control over the reaction process by adjusting parameters such as potential and current density, making it a versatile tool for sustainable chemical synthesis9,10.

Methanol, often referred to as “liquid sunshine”, is a clean energy source and crucial feedstock that can be synthesized through the hydrogenation of carbon dioxide with hydrogen derived from solar energy11,12. With methanol as the primary chemical and electricity as the driving force, the C–N, C–C, and C–O bonds can be constructed efficiently and greenly13,14,15,16. As shown in Fig. 1, Shao et al. reported the synthesis of formamide (with C–N bonds) in an undivided cell from methanol and ammonia with B-doped diamonds as the electrocatalyst17. Xia et al. selectively synthesized ethylene glycol (with C–C bonds) from methanol using Pt as the electrocatalyst18. More recently, Yeo et al. efficiently constructed the C–O bonds, leading to a series of formaldehyde derivatives19. However, to the best of our knowledge, the electrochemical construction of N–C–N bonds using methanol as a reagent has not yet been explored. We also summarized the works on the electrosynthesis of other organonitrogen compounds from C– and N–containing small molecules (Supplementary Table 1).

Fig. 1: Schematic of electrochemical and electro-thermo cascade approaches for methanol valorization.
figure 1

Electrochemical strategies for the construction of diverse chemical bonds using methanol as a reagent and the electro-thermo cascade synthesis of the organonitrogen compounds with (dimethylamino)methyl substituent using the N–C–N bonded compounds as the specific reagents. R1 and R2 represent different or identical groups.

The controlled formation of N–C–N bonds is of particular significance, which is a key building block in a range of applications from drug development to materials science20,21. However, the formation of N–C–N bonds is challenging due to the inherent difficulty in controlling the reactivity of nitrogen-containing species, which often leads to side reactions and poor selectivity. By leveraging electrocatalytic techniques, we aim to overcome the traditional obstacles in N–C–N bond formation, providing a green and efficient pathway for producing the valuable organonitrogen compounds with high selectivity. Moreover, the N–C–N bonded compounds can be further applied to synthesize the high-value organonitrogen compounds with (dimethylamino)methyl substituent through the aminoalkylation reaction22. Consequently, by exploring the electro-thermo cascade synthesis strategy, it is possible to synthesize important organonitrogen compounds, including the anti-tumor drugs such as topotecan hydrochloride with low non-hematologic toxicity23.

The efficient formation of specific chemical bonds through electrocatalysis depends on the elaborate design and synthesis of advanced electrocatalysts, as the category, morphology, and structure of the catalysts significantly impact their catalytic performance24,25,26,27. Among these commonly used catalysts, the single-atom catalysts (SACs) are becoming exceptionally promising catalysts due to their unique catalytic performance resulting from maximum atomic efficiency, unsaturated metal coordination structures, and electron confinement28,29,30. Compared to other transition metals (e.g., Fe, Co, Ni) based SACs, the Zn-SACs have been much less studied for electrocatalysis because of their unusual electronic structures and relatively lower reactivity31,32. Nevertheless, this characteristic of the Zn-SACs could allow for the controlling of the reaction steps for generating and accumulating the specific intermediates. It has been extensively reported that methanol can readily convert into formic acid/formate through deep electrooxidation over transition metal-based elelctrocatalysts33. Thus, we propose that the Zn-SACs with moderate intrinsic oxidizability would be helpful to stabilize the *CH2O intermediate, avoiding over electrooxidation of methanol, which can be further attacked by amine nucleophilic reagents to form the C–N bonds. On the other hand, compared to the Zn-N4 configuration with symmetric coordination and electronic structure, the under-coordinated Zn atoms (e.g., Zn-N3) could lead to a more unsaturated coordination environment, thus optimizing the electronic structure to enhance the catalytic properties34,35. Furthermore, the exposure of the active sites and mass and charge transfer are crucial factors for optimizing the efficiency of electrocatalysis. In particular, the hierarchically ordered porosity with multi-scale pores in an orderly manner can significantly enhance the performance of electrocatalysts, where the micropores can increase the surface area to fully expose the active sites, while the mesopores and macropores aid in reducing the diffusion resistance of reactants and products, particularly for the relatively larger organic molecules, and simultaneously act as reaction reservoirs for boosting reactions36,37. Meanwhile, the ordered pore engineering could form periodic microelectric fields to promote the reactant diffusion, thus effectively optimizing the reaction kinetics38. Inspired by the above factors, the construction of a under-coordinated Zn-SAC with hierarchically ordered porous structure may offer potential for efficient electrocatalytic synthesis of organonitrogen compounds using primary chemicals like methanol.

Herein, a unique Zn-SAC (Zn1/h-OPNC) featuring hierarchically ordered open N-doped carbon isolated with dispersed under-coordinated Zn-N3 sites has been developed for efficient electrochemical construction of N–C–N bonds. The hierarchically ordered open superstructure of such electrocatalyst significantly improves the accessibility of the under-coordinated Zn single-atom sites and reduces mass and charge transfer resistance. Consequently, the distinctive structural characteristics of Zn1/h-OPNC facilitate the efficient electrocatalytic production of N–C–N bonded N,N,N,N′-tetramethyldiaminomethane (TMDM) from methanol and dimethylamine (DMA), achieving a high productivity of 357 μmol h−1 cm−2, along with a near-quantitative selectivity of 96% and a high Faradaic efficiency (FETMDM) of 77% at 0.8 V. Furthermore, an electro-thermo cascade synthesis process is accommodated using TMDM as the specific reagent for the aminoalkylation reaction, leading to the efficient synthesis of a range of high-value organonitrogen compounds with (dimethylamino)methyl substituents, including topotecan hydrochloride, an anti-tumor drug, with an isolated yield up to 95% on a gram scale. In situ attenuated total reflection infrared (ATR-IR) spectroscopy and density functional theory (DFT) calculations indicate that under-coordinated Zn-N3 sites facilitate methanol oxidation and stabilize the key *CH2O intermediate, which then reacts with amine via nucleophilic attack. This work guides the rational design of the spatial and atomic site structures of electrocatalysts and the electrochemical building of N–C–N bonds for valuable organonitrogen synthesis.

Results

Synthesis and characterization of catalysts

Figure 2 illustrates the schematic diagrams for the preparation of three catalysts derived from ordered macroporous ZIF-8 (OM-ZIF-8) single crystals using the monoliths of polystyrene (PS) spheres as the template. In summary, the three-dimensional (3D) ordered PS monoliths were initially prepared through the self-assembly of PS spheres with a diameter of 300 nm (Supplementary Fig. 1). Then, the methanol solutions of zinc nitrate and 2-methylimidazole were mixed and added to the PS monoliths, and the solution was allowed to fully access the template voids by forced impregnation. The methanol-ammonia mixture was further added to promote the nucleation of ZIF-8. After reaction, the template was removed to obtain the single crystals of OM-ZIF-8 with a 3D interconnected ordered macro-microporous structure (Supplementary Fig. 2). Finally, the Zn1/h-OPNC900 and Zn1/h-OPNC, which feature similar hierarchically ordered open superstructures with macro-, nano-, and micropores, were obtained by the pyrolysis of the OM-ZIF-8 precursor mixed with dicyandiamide (DCDA) in an argon atmosphere at 900 and 1000 °C, respectively. By contrast, the consistent procedure without the addition of DCDA resulted in a lack of the multilevel pores in the derived Zn1/OPNC, which was predominantly characterized by macro- and micropores. To facilitate a more comprehensive comparison of the advantages offered by the hierarchically ordered open superstructure morphology, we also synthesized 2D-ZIF with a two-dimensional nanosheet morphology with a thickness of ~1.13 nm (Fig. 2, Supplementary Figs. 3 and 4). Furthermore, the thin porous N-doped carbon nanosheets isolated with Zn single-atom sites (Zn1/f-PNC) were synthesized using 2D-ZIF mixed with DCDA as the precursor.

Fig. 2: Schematic illustration of the synthesis procedures for the Zn-SACs with diverse nanostructures.
figure 2

The monoliths of densely arranged polystyrene (PS) microspheres are used as the template for the preparation of OM-ZIF-8 single crystals. Zn1/h-OPNC900 and Zn1/h-OPNC exhibit similar hierarchically ordered open superstructures, while Zn1/OPNC features an ordered open superstructure, and Zn1/f-PNC consists of thin porous nanosheets.

During the pyrolysis of the ZIF-8 precursors, nitrogen-rich DCDA served as a pore-forming agent and nitrogen source, which decomposed at temperatures between 300 and 350 °C, producing a substantial quantity of ammonia and other N-containing gases to etch the ZIF-8 skeleton and thus induce the formation of additional mesopores. On the other hand, when the temperature was increased above 900 °C, although a significant quantity of Zn in ZIF-8 sublimated due to the low boiling point of metallic Zn (907 °C), a considerable portion of Zn remained and dispersed in the form of single atoms within the carbon skeleton. Consequently, these processes resulted in the unique open superstructure of Zn1/h-OPNC with hierarchically ordered porous N-doped carbon isolated with dispersed Zn single-atom sites. Figure 3a, b, e–f, and Supplementary Fig. 5a, b, f–g present the scanning electron microscope (SEM) images of Zn1/h-OPNC, Zn1/OPNC, Zn1/h-OPNC900, and Zn1/f-PNC at different magnifications, respectively. As illustrated in Fig. 3a, e, and Supplementary Fig. 5a, all three catalysts well inherited the morphology of the maternal OM-ZIF-8 single crystals, showing the approximate polyhedra with highly ordered macropore arrangement, where the average macropore diameter is about 120 nm and the thickness of the surrounding walls is about 30 nm. Notably, for both Zn1/h-OPNC and Zn1/h-OPNC900, in addition to the original ordered macroporous skeleton structures, a substantial quantity of mesopores are distributed uniformly throughout the carbon skeletons (Fig. 3b and Supplementary Fig. 5b), forming the hierarchically ordered open superstructures. Such distinctive structures could play vital roles in electrocatalysis by facilitating the mass transfer within the conductive networks, enhancing the exposure of active sites and acting as the micro/nanoreactors to enrich substrates. In contrast, the SEM images of Zn1/OPNC reveal an ordered macroporous structure, lacking mesopores observed in these skeletons (Fig. 3f). Besides, Zn1/f-PNC exhibits a thin nanosheet nanostructure with some macropores (Supplementary Fig. 5f, g).

Fig. 3: Morphological and structural characterization of Zn1/h-OPNC and Zn1/OPNC.
figure 3

SEM images of (a, b) Zn1/h-OPNC, (e, f) Zn1/OPNC. TEM images of (c) Zn1/h-OPNC, (g) Zn1/OPNC. AC-HADDF-STEM images of (d) Zn1/h-OPNC, (h) Zn1/OPNC. 3D TEM tomography: 3D TEM images of (i) Zn1/h-OPNC and (k) Zn1/OPNC; cross-section images of (j) Zn1/h-OPNC and (l) Zn1/OPNC. Zn atoms are partially circled in yellow for highlight in (d) and (h).

The transmission electron microscopy (TEM) images of the four catalysts provide further evidence that Zn1/h-OPNC and Zn1/h-OPNC900 exhibit ordered macro- and mesoporous morphological characteristics, while Zn1/OPNC displays an ordered macroporous morphological feature and Zn1/f-PNC exhibits ultrathin two-dimensional nanosheet morphology (Fig. 3c, g and Supplementary Fig. 5c, h). The energy-dispersive X-ray (EDX) elemental mappings demonstrate that the C, N, and Zn elements are present in a uniform distribution across the four catalysts (Supplementary Fig. 5d, i and Supplementary Fig. 6), and the contents of Zn were detected by inductively coupled plasma (ICP) in Supplementary Table 2. The aberration-corrected high-angle annular dark-field scanning transmission electron microscopy (AC-HADDF-STEM) images show the existence of a considerable number of bright spots (partially circled in yellow for highlight), indicating that these Zn atoms are uniformly distributed in a single-atom level on the carbon skeleton of the four catalysts, without discernible agglomeration (Fig. 3d, h, and Supplementary Fig. 5e, j).

To clearly visualize the hierarchical porous morphology of Zn1/h-OPNC, the 3D TEM tomography was further conducted. As shown in Fig. 3i, k, Supplementary Fig. 7 and Supplementary Movie 1 and 2, it is observed that both Zn1/h-OPNC and Zn1/OPNC retain the ordered macroporous morphological feature. Notably, the cross-section images depicted in Fig. 3j, l display the apparent mesoporous structure of Zn1/h-OPNC (partially circled in yellow for emphasis), in addition to the macropores. By contrast, the relatively large mesopores were not observed for Zn1/OPNC. Furthermore, Zn1/h-OPNC exhibits a 58% increase in porosity in comparison to Zn1/OPNC on the basis of the TEM tomographic results (Supplementary Fig. 8), providing further evidence that Zn1/h-OPNC forms the hierarchically ordered open superstructure.

To gain further insights into the nanostructures of these Zn-SACs, more other characterizations were conducted. As illustrated in Fig. 4a, the powder X-ray diffraction (PXRD) patterns of the four catalysts only exhibit a characteristic crystalline phase of graphitic carbon devoid of metal peaks, which further corroborates the atomic dispersion of the metal Zn. Furthermore, the comparable intensity ratios of the D-band and G-band (ID/IG) in the Raman spectra of the four catalysts indicate a similar degree of graphitization and surface defects (Fig. 4b). The hierarchical porous structures of the catalysts can be further corroborated by N2 sorption analysis. As shown in Supplementary Fig. 9, the N2 sorption isotherms of Zn1/h-OPNC, Zn1/h-OPNC900, and Zn1/OPNC exhibit a combination of I and IV-type isotherms, displaying a high N2 uptake at lower pressures and distinctive hysteresis loops at higher pressures. This suggests the existence of both micropores and mesopores in the three catalysts, which is further verified by the pore size distribution curves (Fig. 4c). However, the proportions of the mesopores in Zn1/h-OPNC and Zn1/h-OPNC900 are higher than that of Zn1/OPNC. As a result, the abundance of the multilevel porosity of Zn1/h-OPNC leads to a high Brunauer–Emmett–Teller (BET) surface area of 460.72 m² g⁻¹. Furthermore, Zn1/f-PNC displays a typical type I isotherm, indicative of the predominance of micropores. These findings align well with their SEM and TEM observations. Then, the X-ray photoelectron spectroscopy (XPS) technique was employed to elucidate the chemical compositions and chemical status of the catalysts. As shown in Fig. 4d, the high-resolution N 1 s spectra can be deconvoluted into five distinct types of N species, corresponding to pyridine N (398.5 eV), pyrrole N (401.2 eV), graphite N (402.7 eV), oxide N (404.5 eV), and Zn-N (399.7 eV). In the high-resolution Zn 2p spectra, two peaks were observed at 1044.8 and 1021.9 eV, which are assigned to Zn 2p1/2 and Zn 2p3/2, respectively (Supplementary Fig. 10)34,39. The XPS analysis indicates that all these Zn-SACs possess the Zn-Nx coordination.

Fig. 4: Physical characterizations of Zn1/h-OPNC, Zn1/h-OPNC900, Zn1/OPNC and Zn1/f-PN.
figure 4

a PXRD patterns; (b) Raman spectra; (c) pore size distribution curve; (d) high-resolution N 1 s XPS spectra; (e) XANES spectra; (f) FT-EXAFS spectra; FT-EXAFS fitting curves in (g) R space and (h) k space; (i) WT-EXAFS plots of Zn1/h-OPNC and Zn1/h-OPNC900. The insets in (g) show the Zn-N3 (top) and Zn-N4 (bottom) models, respectively.

To further investigate the coordination environment and chemical information of the Zn atoms in the catalysts, X-ray absorption near edge structure (XANES) and extended X-ray fine structure spectroscopy (EXAFS) analysis were performed. As illustrated in Fig. 4e, within the energy range of 9658 to 9666 eV, the Zn K-edge XANES spectrum of Zn1/h-OPNC is situated between those of Zn foil and ZnO, indicating that the valence state of the Zn sites is between 0 and +2. By contrast, the spectrum of Zn1/h-OPNC900 is close to that of the Zn(II) phthalocyanine (ZnPc) reference, suggesting the different coordination and electronic structures between Zn1/h-OPNC and Zn1/h-OPNC900 obtained at different calcination temperatures. Furthermore, the Fourier transformed (FT)-EXAFS spectra of Zn K-edge (Fig. 4f), reveal that the predominant peaks for Zn1/h-OPNC and Zn1/h-OPNC900 are at ~1.53 Å, which could be attributed to the first coordination shell of Zn-N bonding. No typical peaks for Zn-Zn bonding at ~2.30 Å were detected, further confirming the formation of the Zn-Nx sites. Moreover, the chemical coordination environments of Zn1/h-OPNC and Zn1/h-OPNC900 were determined through EXAFS fitting (Fig. 4g, h). The fitting results in R space and k space indicate that the Zn-N coordination numbers of Zn1/h-OPNC and Zn1/h-OPNC900 are around 3 and 4, respectively (Supplementary Table 3), corresponding to the Zn-N3 and Zn-N4 sites. To ascertain the coordination environments of Zn1/h-OPNC and Zn1/h-OPNC900 more visually, the wavelet transform (WT) of the EXAFS spectra was conducted (Fig. 4i and Supplementary Fig. 11). The results demonstrate that the maximum intensities of Zn1/h-OPNC and Zn1/h-OPNC900 at ~3.89 and ~4.02 Å–1, respectively, are attributed to the Zn-N bonds, and no Zn-Zn peaks were observed at ~7.8 Å–140,41. The above characterization results demonstrate that the Zn1/h-OPNC catalyst featuring a hierarchically ordered open superstructure isolated with readily accessible under-coordinated Zn-N3 sites has been successfully synthesized.

Electrocatalytic N–C–N coupling to prepare TMDM and its derivatives

In view of the unique nanostructure of Zn1/h-OPNC and the catalytic Zn-N3 sites, we employed it as a catalyst for electrocatalytic N–C–N coupling to synthesize special organonitrogen compounds from methanol and amines. Taking the electrosynthesis of TMDM as an example, we initially evaluated the electrocatalytic activity and selectivity of Zn1/h-OPNC, Zn1/h-OPNC900, Zn1/OPNC, and Zn1/f-PNC for the preparation of TMDM using methanol and dimethylamine (DMA) in the H-type cell. The linear sweep voltammetry (LSV) curves of these catalysts are presented in Fig. 5a, demonstrating that Zn1/h-OPNC exhibits the lowest onset potential and the highest current density, while Zn1/OPNC and Zn1/f-PNC display moderate current densities, and Zn1/h-OPNC900 exhibits the lowest one. The results should be associated with the morphological configurations of the four catalysts, as well as the coordination environments of the Zn single-atom sites. By normalizing the current densities of the catalysts to their electrochemically active surface areas (ECSAs) (Supplementary Fig. 12a–e), the ECSA-normalized LSV curves were obtained. As shown in Supplementary Fig. 12f, the normalized current density of Zn1/h-OPNC is significantly higher than that of Zn1/h-OPNC900, indicating that the Zn-N3 sites exhibit a better intrinsic catalytic activity in comparison to Zn-N4. During the electrocatalysis processes, gas chromatography mass spectrometer (GC-MS), gas chromatography (GC), and nuclear magnetic resonance (NMR) spectroscopy were employed for qualitatively and quantitatively analyzing the products (Supplementary Figs. 1315). As illustrated in Fig. 5b, consistent with the current density tendency observed in Fig. 5a, Zn1/h-OPNC exhibits the highest productivity of TMDM, reaching 220 μmol h−1 cm−2, while those over Zn1/OPNC, Zn1/f-PNC, and Zn1/h-OPNC900 are 98.56, 32.06, and 21.43 μmol h−1 cm−2, respectively. This considerable discrepancy in performance could be attributed to their different nanostructures. Compared with Zn1/OPNC900, Zn1/h-OPNC has a unique hierarchically ordered open superstructure, in which the plentiful well-ordered macropores, mesopores, and micropores can effectively facilitate mass transfer and sufficiently expose the Zn-N3 active sites. Meanwhile, in comparison to Zn1/f-PNC with an ultrathin nanosheet morphology beneficial to the site exposure, the voids with ordered arrangement in Zn1/h-OPNC can act as the micro/nanoreactors with a nanoconfinement effect, which enables the enrichment of the substrates in an optimal manner and the stabilization of the intermediates, thereby facilitating the subsequent N–C–N coupling reaction42,43. A substrate adsorption experiment was performed to provide further evidence for the hypothesis that the hierarchically ordered open superstructure can enrich the substrates (Supplementary Table 4). Furthermore, as Zn1/h-OPNC and Zn1/h-OPNC900 possess similar morphology and porosity, their activity disparity can elucidate the higher intrinsic electrocatalytic activity of the Zn-N3 active sites with lower coordination than that of the Zn-N4 sites. It is important to note that the moderate activity of Zn-N3 active sites, in comparison to other transition metal (e.g., Pt, Co, Ni) based SACs44,45,46, can avoid the deep electrooxidation of methanol to formate or CO2 and facilitate the formation and accumulation of the *CH2O intermediates, thereby favoring further attacked by amine nucleophilic reagents to form the N–C–N bonds.

Fig. 5: Electrocatalytic properties of Zn1/h-OPNC, Zn1/h-OPNC900, Zn1/OPNC and Zn1/f-PNC for N–C–N coupling to prepare TMDM.
figure 5

a LSV curves and (b) productivity at 0.8 V in 0.7 M K2CO3 with MeOH:DMA = 4:1; (c) productivity of Zn1/h-OPNC at different potentials in 0.7 M K2CO3 with MeOH:DMA = 4:1; (d) productivity and (e) FETMDM of Zn1/h-OPNC at 0.8 V in 0.7 M K2CO3 with different concentration ratios of MeOH and DMA; (f) stability test for Zn1/h-OPNC at 0.8 V in 0.7 M K2CO3 with MeOH:DMA = 1:2; (g) overall performance diagram for stability test.

As illustrated in Fig. 5c and Supplementary Fig. 16, it was observed that as the reaction potential increased, the productivity of TMDM exhibited a quick rise until it reached a plateau at 0.8 V, whereas the selectivity and FETMDM exhibited a decline with the emergence of by-products such as formate and N,N-dimethylformamide (DMF). It is notable that within the test potential range, the formate is trace and only a small quantity of TMDM underwent further oxidation to form DMF, which was further demonstrated by single-variable electrolysis experiments (Supplementary Table 5). This indicates that the Zn-N3 sites are capable of stabilizing the *CH2O while remaining inert to TMDM, thereby promoting the generation of TMDM. Collectively, these observations indicate that the optimal reaction potential is 0.8 V. Subsequently, the impact of varying the methanol and DMA concentrations in the reaction electrolyte on TMDM generation was investigated. When the methanol-to-dimethylamine ratio was 1:2, TMDM could be generated at the highest productivity of 357 μmol h−1 cm−2 with a FETMDM of 77% and a near-quantitative selectivity of 96% (Fig. 5d, e and Supplementary Fig. 17). The FETMDM was found to be only 7.6% when only DMA was added, while a trace amount of DMF was generated, indicating that methanol is a necessary substrate for generating a large amount of TMDM (Supplementary Table 5). As illustrated in Supplementary Fig. 18, the catalytic performance of Zn1/h-OPNC was superior to those of Zn1/OPNC, Zn1/f-PNC, and Zn1/h-OPNC900 under the optimal test conditions (MeOH:DMA = 1:2, 0.8 V). This indicates that the distinctive structure and atomic sites of Zn1/h-OPNC exert a facilitating effect on the reaction. Furthermore, the long-term stability test for 15 h demonstrates that Zn1/h-OPNC exhibited a consistent catalytic activity, capable of well maintaining the high FETMDM (~73%), productivity (~335 μmol h−1 cm−2), and selectivity (~97%) for TMDM production (Fig. 5f, g).

In light of the remarkable efficacy of Zn1/h-OPNC in the electrocatalytic synthesis of TMDM, we proceeded to construct a series of N–C–N bonded compounds from methanol by introducing different amines. As shown in Fig. 6a and Supplementary Figs. 1921, the replacement of dimethylamine with N-methylethylamine, diethylamine, and morpholine allowed for the electrosynthesis of N,N′-diethyl-N,N′-dimethylmethanediamine (FE: 47%, YR: 135 μmol h−1 cm−2), N,N,N,N′-tetraethylmethanediamine (FE: 31%, YR: 28 μmol h−1 cm−2) and dimorpholinomethane (FE: 12%, YR: 21 μmol h−1 cm−2), respectively. It can be reasonably assumed that the steric-hindrance effect is responsible for the observed decline in yields and FEs of the N–C–N bonded products, due to the increased chain lengths of the amines and the introduction of the heterocycle. Furthermore, the scope of amines was expanded upon (Supplementary Fig. 22), yet the target N–C–N bonded products were not obtained. This may be due to the steric-hindrance effect and/or varied abilities of amines for subsequent nucleophilic addition.

Fig. 6: Substrate scope expansion experiment and electro-thermal cascade investigation.
figure 6

a Electrocatalytic construction of diverse N–C–N bonded compounds; (b) electro-thermo cascade synthesis of the organonitrogens bearing the (dimethylamino)methyl substituent using electrosynthesized TMDM as the reagent; (c) representative TMDM-relayed cascade synthesis of the drug topotecan hydrochloride and its derivative from electrosynthesized TMDM; (d) merits of electrocatalytic N–C–N coupling; (e) value assessment of raw materials and products. Lightning in (c) represents an electrochemical process. FE is Faradaic efficiency, and YR represents productivity.

Aminoalkylation reaction as an efficient approach for the introduction of C–C and C–N bonds, playing an important role in the field of organic synthesis, particularly medicinal chemistry. By virtue of the remarkably high productivity and selectivity for TMDM production over Zn1/h-OPNC, we further proposed the electro-thermo cascade synthesis of a specific set of high-value organonitrogen compounds using the electrochemically generated TMDM as the reagent for aminoalkylation reaction (Fig. 6b and Supplementary Figs  2330). Notably, all of these TMDM-relayed cascade reactions for the synthesis of the organonitrogens bearing the (dimethylamino)methyl substituent afforded the satisfactory yields exceeding 70%. Furthermore, this electro-thermo cascade synthesis strategy can be applied for synthesizing the expensive pharmaceuticals through introducing the (dimethylamino)methyl substituent. Taking topotecan hydrochloride as an example—an antitumor drug known for its low non-hematological toxicity and high cost, the reaction of 1.00 g of 10-hydroxycamptothecin with electrosynthesized TMDM produced 1.16 g of topotecan hydrochloride, corresponding to an excellent yield of 95% with the electron efficiency of 73% (Fig. 6c and Supplementary Figs. 3133). In addition, the synthesized topotecan hydrochloride can be further reacted with 1,3-propanesulfonate, giving the topotecan derivative with a sulfonic acid group (Fig. 6c and Supplementary Figs.  3436). This drug derivative with charges can be assembled into a nanomedicine, which has the potential to be an efficacious antitumor drug47.

The aforementioned experimental results demonstrate that the production of diverse N–C–N bonded compounds is feasible through the alteration of the amine type using methanol as a cost-effective and environmentally benign raw material. To illustrate, the employment of DMA as the reagent enables the extraction of TMDM, a much more value-added product, through a straightforward process. Furthermore, the integration of electrosynthesis of TMDM with the aminoalkylation reaction can facilitate the electro-thermo cascade synthesis of special and high value-added organonitrogen products with the (dimethylamino)methyl substituent, which is a convenient procedure and is a promising strategy for large-scale applications (Fig. 6d). A further comparison is conducted between the prices of the feedstocks (methanol and dimethylamine), the potential by-products (formic acid and dimethoxymethane), and the product (TMDM) (Fig. 6e). The results indicate that TMDM exhibits the highest value, suggesting that the synthesis of TMDM from methanol and dimethylamine is economically feasible.

Mechanistic study

To delve into the reaction mechanism of the electrochemical N–C–N coupling over Zn1/h-OPNC, the synthesis of TMDM from methanol and DMA was selected as a case study. Initially, the in situ attenuated total reflection infrared (ATR-IR) spectroscopy was employed to monitor the evolution of the intermediates during the reaction (Fig. 7a and Supplementary Fig. 37). The infrared spectra were recorded at 0.2 V for real-time analyzes. Firstly, no discernible characteristic peaks were detected at 0 s, suggesting that the reaction is an electrochemical process. At the 30-s mark, two distinctive negative and positive peaks emerged at 1415 and 1662 cm−1, corresponding to the stretching modes of desorbed CO32− and generated *CH2O, respectively48,49. As the reaction time increased, the peak of *CH2O at 1662 cm−1 steadily rose until the 510-s mark, indicating that the amount of *CH2O generated from the oxidation of methanol exhibited a growth tendency before reaching a plateau with increasing time. Moreover, a new peak emerged at 1623 cm−1, which can be ascribed to the stretching vibration of *O = C–N, indicating the decomposition of partial TMDM to yield DMF. Furthermore, in situ Raman spectroscopy was employed to record the evolution of the intermediates during the reaction (Supplementary Figs. 38 and 39). A series of comaprative experiments with variable substrates was conducted. As illustrated in Supplementary Fig. 39a, the addition of DMA alone did not result in the appearance of a signal at 1059 cm−1 for *CH2O during the 770 s electrolysis50. The *CH2O peak was observed after 470 s of electrolysis when CH3OH was the only reactant (Supplementary Fig. 39b). Furthermore, the addition of both CH3OH and DMA resulted in the emergence of a distinct *CH2O peak after only 170 s of electrolysis (Supplementary Fig. 39c). This suggests that the addition of DMA can facilitate the oxidation of methanol, resulting in the formation of *CH2O. When 13CH3OH was employed, a new peak emerged at 1020 cm−1, which can be deduced as the peak of *13CH2O (Supplementary Fig. 39d). The blue-shift of the *CH2O peak can be ascribed to the isotope effect51. It is noted that the simultaneous presence of the *12CH2O peak could be due to the reaction of OH in the electrolyte with DMA during the prolonged electrolysis to produce *12CH2O49. The observation is consistent with the results of the univariate experiments (Supplementary Table 5), where only DMA was added and the FETMDM was 7.6%. Supplementary Fig. 40 shows the GC spectrum following the in situ Raman test, and the peak of the product TMDM is relatively weak due to the short electrolysis time of the in situ Raman test. The in situ ATR-IR and in situ Raman results demonstrate that the process of N–C–N coupling should be highly correlative with the oxidation of methanol to generate the key *CH2O intermediate, which is followed by the aldimine condensation reaction through the nucleophilic addition with DMA.

Fig. 7: Mechanistic study and DFT calculations.
figure 7

a In situ ATR-IR spectra for the electrosynthesis of TMDM from methanol and DMA over Zn1/h-OPNC; (b) control experiments for the synthesis of TMDM; (c) schematic representation of the electrosynthesis of TMDM; (d) Gibbs free energy for the formation of *CH2O over the Zn-N3 and Zn-N4 model configurations; (e) projected density of states (PDOS) for Zn-3d orbitals and C-2p orbitals of *CH2O.

To further support the critical role of the *CH2O intermediate for TMDM production, we examined the GC profiles of the electrolytes following a series of reactions. As illustrated in Fig. 7b, when methanol and DMA were directly mixed in the electrolyte without energization, no TMDM was generated. Besides, the absence of TMDM in the reaction between formic acid and DMA suggests that the deep oxidation of methanol is unfavorable for TMDM preparation. Moreover, when formaldehyde was mixed with dimethylamine, although TMDM was produced, a considerable number of impurities were present, in comparison with the electrochemically prepared TMDM. The aforementioned results indicate that the electrochemical generation and stabilization of *CH2O are essential for the subsequent nucleophilic addition reaction with DMA to generate TMDM. As a result, the electrochemical preparation of TMDM exhibits a distinct advantage in terms of high purity. In light of the aforementioned experimental results, we summarized the reaction pathways. As illustrated in Fig. 7c, methanol is subjected to a moderate electrochemical oxidation process, resulting in the generation of *CH2O, which subsequently undergoes a two-step nucleophilic addition reaction with DMA in the electrolyte, leading to the production of TMDM. As the applied potential increases, a small portion of TMDM undergoes further electrooxidation to form DMF, which is confirmed by univariate experiments (Supplementary Table 5). We deduce a proposed reaction mechanism for the electrosynthesis of TMDM from methanol and DMA in Supplementary Fig. 41.

Owing to the essential role of *CH2O during the electrochemical N–C–N coupling, the Gibbs free energy diagram for the *CH2O formation from methanol is presented over the Zn-N3 and Zn-N4 model configurations of Zn1/h-OPNC and Zn1/h-OPNC900, representively (Fig. 7d and Supplementary Fig. 42). Compared to the Zn-N4 active sites, the Zn-N3 ones display a lower change in Gibbs free energy, suggesting that the Zn1/h-OPNC catalyst should be more conducive for the generation of *CH2O. This conclusion is consistent with the experimental results, which demonstrate the superior performance of Zn1/h-OPNC for producing TMDM than Zn1/h-OPNC900. Additionally, the projected density of states (PDOS) further reveals that the Zn-N3 coordination structure of Zn1/h-OPNC shows more overlap between the Zn-3d orbital and the C-2p orbital of *CH2O, as compared to the Zn-N4 of Zn1/h-OPNC900 (Fig. 7e). This also suggests that Zn1/h-OPNC is more favorable for the stabilization of *CH2O, thereby facilitating the subsequent nucleophilic addition reaction of the amine.

Discussion

In summary, a hierarchically ordered open superstructure of N-doped carbon embedded with readily accessible under-coordinated Zn-N3 sites has been constructed for efficient construction of N–C–N bonds. The integration of additional secondary mesopores into the ordered macroporous skeleton results in a distinctive superstructure that exhibits greatly enhanced site accessibility and mass transfer. In conjunction with the unique catalyst nanostructure and the highly exposed unusual Zn-N3 sites, Zn1/h-OPNC demonstrates high activity and selectivity for electrochemical N–C–N coupling. Particularly, TMDM, as a typical N–C–N bonded compound, can be efficiently generated with an ultrahigh productivity of 357 μmol h−1 cm−2, as well as a near-unity selectivity of 96% and a high FE of ~77% at 0.8 V. Based on the efficient electrochemical N–C–N coupling, we successfully further developed the exemplary electro-thermo cascade strategy for TMDM-relayed synthesis of high-value organonitrogen compounds with (dimethylamino)methyl substituent, including gram-scale topotecan hydrochloride, an anti-tumor drug, with a high yield of 95%. Meanwhile, in situ ATR-IR spectroscopy and DFT calculations demonstrate that Zn1/h-OPNC with under-coordinated Zn-N3 sites facilitates the oxidation of methanol to produce the key *CH2O intermediate, thereby promoting subsequent nucleophilic addition step with amines. This work offers valuable guidance for the intelligent design of advanced electrocatalysts and the electrochemical synthesis of organonitrogen compounds.

Methods

Materials

Styrene (99%) was obtained from Aladdin Co., and further washed by sodium hydroxide (NaOH, 10 wt%) aqueous solution and deionized water several times to remove the p-tert-butylcatechol. Potassium persulfate (K2S2O8, A.R., Sinopharm Chemical Reagent Co. (SCRC)) was recrystallized before use. Polyvinyl pyrrolidone (PVP, Mw ~ 58000, Adamas), zinc nitrate hexahydrate (Zn(NO3)2‧6H2O, A.R., SCRC), 2-methylimidazole (C4H6N2, 98%, Aladdin Co.), methanol (CH3OH, A.R., SCRC), Pt foil (Pt, Wuhan Gaoshiruilian Science and Technology Co.), carbon paper (CP, Toray Industries, Inc), ethanol (CH2CH3OH, A.R., SCRC), ammonium hydroxide (NH3·H2O, A.R., SCRC), N,N-dimethylformamide (C3H7NO, A.R., Xilong Technology), dicyandiamide (C2H4N4, A.R., SCRC), dimethylamine (C2H7N, A.R., Shanghai Adamas Reagent Co., 40 wt.% solution in water), N,N,N,N′-tetramethyldiaminomethane (C5H14N2, RG., Shanghai Adamas Reagent Co.), dichloromethane (CH2Cl2, A.R., SCRC), 1,2-dichlorobenzene (C6H4Cl2, A.R., SCRC), trichloromethane (CHCl3, A.R., SCRC), phenol (C6H6O, A.R., SCRC), cuprous chloride (CuCl, A.R., SCRC), 2-naphthol (C10H8O, AG., Shanghai Adamas Reagent Co.), toluene (C7H8, A.R., SCRC), 1,2,4-triazole (C2H3N3, AG., Shanghai Adamas Reagent Co.), palladium diacetylacetonate (C10H16O4Pd, AG., Shanghai Adamas Reagent Co.), imidazole (C3H4N2, AG., Shanghai Adamas Reagent Co.), succinic anhydride (C4H4O3, AG., Shanghai Adamas Reagent Co.), 10-hydroxycamptothecin (C20H16N2O5, AG., Shanghai Adamas Reagent Co.), 1,3-propanesulfonate (C3H6O3S, AG., Shanghai Adamas Reagent Co.), methanol-13C (13CH3OH, A.R., Shanghai Adamas Reagent Co.) were used without further purification.

Preparation of polystyrene (PS) monolith

0.5 g of PVP and 100 mL of deionized water were added in a 250 mL of three-necked flask and heated to 70 °C at 600 rpm under N2 atmosphere. 13 mL of treated styrene was added and kept at 70 °C for 20 min. Then, 20 mL of 0.015 g mL−1 K2S2O8 solution was added, and the reaction was continued for 24 h. The obtained suspension was centrifuged and dried at 60 °C to yield the PS monolith.

Preparation of OM-ZIF-8

First, the methanol solutions of Zn(NO3)2·6H2O (22.5 mL, 0.36 g mL−1) and 2-methylimidazole (22.5 mL, 0.30 g mL−1) were prepared. After thoroughly mixing the above solutions, 4.0 g of PS template was added, and the mixture was impregnated for 30 minutes. Subsequently, the mixture was further vacuum degassed for 20 min. The PS template was taken out and dried at 50 °C for 6 h, and then transferred to 30 mL of methanol and ammonia (v:v = 1:1). The mixture was further vacuum degassed for 10 min and set aside for 24 h at room temperature to promote the growth of ZIF-8. Then, the soaked PS template was extracted and dried at 50 °C to obtain ZIF-8@PS. Finally, the PS template was removed by soaking in DMF, and the solid left was filtrated, rinsed with methanol, and dried to obtain OM-ZIF-8.

Preparation of Zn1/h-OPNC, Zn1/OPNC and Zn1/h-OPNC900

Zn1/h-OPNC was obtained by calcining the mixture of OM-ZIF-8 (100 mg) and DCDA (500 mg) at 1000 °C for 2 h under an Ar atmosphere, with an elevated temperature rate of 2 °C min−1. Zn1/h-OPNC900 and Zn1/OPNC were prepared in the same way, except that Zn1/h-OPNC900 was calcined at 900 °C, while Zn1/OPNC was calcined without adding DCDA.

Preparation of 2D-ZIF

0.330 g (1.11 mmol) of Zn(NO3)2‧6H2O and 0.985 g (12.0 mmol) of 2-methylimidazole were each dissolved in 90 mL of deionized water. The above two solutions were mixed and stirred at room temperature for 24 h. After standing, the mixture was centrifuged, and the solid was rinsed with methanol and deionized water, and dried at 60 °C to obtain 2D-ZIF.

Preparation of Zn1/f-PNC

Zn1/f-PNC was obtained by calcining the mixture of 2D-ZIF (100 mg) and DCDA (500 mg) at 1000 °C for 2 h under an Ar atmosphere, with an elevated temperature rate of 2 °C min−1.

Characterizations

The scanning electron microscopy (SEM) images were obtained on JSM6700-F. Powder X-ray diffraction (PXRD) patterns were gained on a MiniFlex diffractometer (MiniFlex600, Rigaku). Transmission electron microscopy (TEM) images and high-resolution transmission electron microscopy (HRTEM) images were collected from FEI Titan Themis 200. Atomic force microscope images were obtained in a Bruker Dimension ICON. The X-ray photoelectron spectroscopy (XPS) data were obtained from the Thermo Fisher ESCALAB 250Xi spectrometer. In situ attenuated total reflection-infrared (ATR-IR) spectra were recorded on the NICOLET 6700 instrument. The nuclear magnetic resonance (NMR) spectra were recorded on the ECZ600R. The liquid products were detected by Shimadzu GCMS-QP2020 gas chromatograph mass spectrometer (GC-MS) and Shimadzu GC-2018 gas chromatography (GC) featuring an FID detector and HP-5 column. The mass spectrometry (MS) spectra were recorded on the Bruker Impact II Q-TOF instrument.

3D TEM tomography

3D TEM tomography was collected from JEOL JEM-F200 at 200 kV. The electron micrographs were acquired using a single-axis high-tilt tomography holder from −73° to 71° with a linear tilt step of 2°. At each tilt angle, the beam was focused on a neighboring area to minimize the damage to the region of interest. The application of tophat filtering served to eliminate the back bottom and thereby mitigate the back bottom effect. The manual segmentation method was employed to divide the projection and extract the effective area. Image alignment was performed using the center of mass method. The aligned tilt series were reconstructed using the Fourier-based reconstruction algorithm with 50 iterations. The reconstructed 3D volume was segmented and refined by threshold segmentation and Gaussian filter in MATLAB. The porosity can be calculated as follows: porosity = Vframe/Vtotal × 100%. Where Vframe is the reconstructed 3D body for binarised acquisition, and Vtotal is the total volume of the reconstructed 3D body following the implementation of hole-filling techniques.

Electrochemical measurements

The catalyst ink was prepared by mixing 350 μL of H2O,100 μL of isopropanol, 50 μL of Nafion solution (5 wt% in isopropanol), and 5 mg of catalyst together, and then ultrasonic treatment for 1 h. Then, based on the zinc content, a certain volume of the ink was evenly loaded on the two sides of a carbon paper (1.0 × 1.0 cm2) to obtain a metal loading of 1 mg cm−2. All the electrochemical measurements were conducted on the CHI760E electrochemical workstation (Shanghai Chen-Hua Instrument Corporation, China) and tested in a proton exchange membrane (Nafion®117) separated H-type cell by using a typical three-electrode system. Pt mesh and Hg/HgO (1 M KOH) electrodes were used as the counter and reference electrodes, respectively. The anodic compartment was filled with 15 mL of 0.7 M K2CO3 and 5 mL of a mixed solution of methanol and ammonia with different volume ratios. The cathodic compartment was filled with 20 mL of 0.7 M K2CO3. The linear sweep voltammetry (LSV) polarization curves were measured at a scan rate of 10.0 mV s−1. All curves were gained without IR compensation. All electrochemical measurements were performed at ambient temperature (25 °C) and pressure.

Calculation of Faradaic efficiency and electron efficiency

Assuming that the formation of a DMF molecule demands six electrons and one TMDM requires two electrons, the Faradaic efficiency (FE) can be calculated as follows: FE (%) = 100znF/Q. Where z is the number of electrons required to form a molecule of product, n is the mole of product formed, F is the Faraday constant (96485 C mol−1), and Q is the electric quantity. The electron efficiency (EE) is calculated as follows: EE (%) = FE × Yield.

Synthesis of other N–C–N bonded organonitrogen compounds: N,N′-diethyl-N,N′-dimethylmethanediamine, N,N,N,N′-tetraethylmethanediamine and dimorpholinomethane

Other N–C–N bonded organonitrogen compounds were synthesized according to the procedures for TMDM, with the use of different amines as the reagents. The cathodic compartment was filled with 20 mL of 0.7 M K2CO3, while the anodic compartment was filled with 15 mL of 0.7 M K2CO3, 1 mL of methanol, and 4 mL of 40 wt% amine solution. After electrolysis for 3 h at 0.8 V, the electrolytes were extracted with dichloromethane, and the products were quantified by GC.

Synthesis of the organonitrogen compounds with (dimethylamino)methyl substituent

2-[(Dimethylamino)methyl]phenol

Following electrolysis, the electrolyte was extracted with 5 mL of trichloromethane and dried with anhydrous sodium sulfate. The resulting solution was then added to a single-necked flask with 94.1 mg (1 mmol) of phenol and 4.04 mg (0.04 mmol) of CuCl and stirred at 50 °C for 12 h. The product was quantified by GC. Yield: 56 mg (72%). 1H NMR (600 MHz, DMSO-d6): δ 7.13-6.98 (m, 2H), 6.72 (dd, J = 9.3, 5.1 Hz, 2H), 3.55 (s, 2H), 2.22 (s, 6H).

1-[(Dimethylamino)methyl]-2-naphthalenol

Following electrolysis, the electrolyte was extracted with 5 mL of trichloromethane and dried with anhydrous sodium sulfate. The resulting solution was then added to a single-necked flask with 169 mg (1.17 mmol) of 2-naphthol, 8 mg of K2CO3, and refluxed at 60 °C for 6 h. The resulting solution was extracted with 1 M HCl, and then the pH was adjusted to 8 by the addition of K2CO3. The precipitated solid was filtered and dried, resulting in the product. Yield: 204 mg (86%). 1H NMR (600 MHz, DMSO-d6): δ 7.93 (d, J = 5.7 Hz, 1H), 7.77 (d, J = 5.4 Hz, 1H), 7.70 (d, J = 5.9 Hz, 1H), 7.42 (t, J = 5.1 Hz, 1H), 7.26 (t, J = 4.9 Hz, 1H), 7.06 (d, J = 5.9 Hz, 1H), 3.98 (s, 2H), 2.29 (s, 6H); HRMS (m/z): [M + H]+ calcd. for C13H16NO, 202.1154; found, 202.1235.

N,N-dimethyl-1-1,2,4-triazol-1-methanamine

Following electrolysis, the electrolyte was extracted with 5 mL of toluene and dried with anhydrous sodium sulfate. The resulting solution was then added to a single-necked flask with 69.1 mg (1 mmol) of 1,2,4-triazole, 1 mg of Pd(acac)2, and refluxed at 90 °C for 4 h. Subsequently, after filtration, the product was obtained by rotary evaporation of the filtrate. Yield: 108 mg (85%). 1H NMR (600 MHz, DMSO-d6): δ 8.55 (s, 1H), 7.97 (s, 1H), 4.98 (s, 2H), 2.19 (s, 6H). HRMS (m/z): [M-C2H2N3]+ calcd. for C3H8N, 58.0675; found, 58.0500.

N,N-dimethyl-1H-imidazole-1-methanamine

Following electrolysis, the electrolyte was extracted with 15 mL of trichloromethane and dried with anhydrous sodium sulfate. The resulting solution was then added to a single-necked flask with 138 mg (2 mmol) of imidazole, 152 mg (1.1 mmol) of K2CO3, and 111 mg (1.1 mmol) of succinic anhydride, and the mixture was stirred at room temperature for 1 h. After reaction, 50 mL of trichloromethane was added, and the organic phase was washed with 1 M NaOH and saturated NaCl solution, respectively. The organic phase was then dried with anhydrous sodium sulfate, and the resulting product was obtained by rotary evaporation. Yield: 94 mg (94%). 1H NMR (600 MHz, DMSO-d6): δ 7.62 (s, 1H), 7.15 (s, 1H), 6.90 (s, 1H), 4.73 (s, 2H), 2.15 (s, 6H). HRMS (m/z): [M + H]+ calcd. for C5H11N4, 125.175; found, 126.1013.

Topotecan hydrochloride

Following electrolysis, the electrolyte was extracted with 5 mL of trichloromethane and dried with anhydrous sodium sulfate. The extracts from six electrolysis batches were combined and added to a single-necked flask, together with 1.00 g (2.69 mmol) of 10-hydroxycamptothecin. The mixture was then stirred at 45 °C for 24 hours. After the reaction, the solid was obtained by rotary evaporation. The solid was dissolved in 20 mL of 0.4 M HCl and stirred at room temperature for 16 hours. The resulting solution was filtered and freeze-dried to obtain the product. Yield: 1.16 g (95%). 1H NMR (600 MHz, DMSO-d6): δ 9.82 (s, 1H), 8.98 (s, 1H), 8.17 (d, J = 6.2 Hz, 1H), 7.72 (d, J = 6.1 Hz, 1H), 7.28 (s, 1H), 6.53 (s, 1H), 5.42 (s, 2H), 5.26 (s, 2H), 4.72 (s, 2H), 2.83 (s, 6H), 1.87 (m, J = 14.2, 9.4, 4.8 Hz, 2H), 0.88 (t, J = 4.9 Hz, 3H); UV/Vis: λmax 225 nm; HRMS (m/z): [M–Cl]+ calcd. for C23H24N3O5, 422.1710; found, 422.1706.

3-(((4-ethyl-4,9-dihydroxy-3,14-dioxo-3,4,12,14-tetrahydro-1H pyrano[3′,4′:6,7]indolizino[1,2-b]quinolin-10 yl)methyl)dimethylammonio)propane-1-sulfonate (Sulfonate functionalized topotecan)

Topotecan hydrochloride (0.2 mmol, 92 mg) was combined with 5 mL of trichloromethane and 24.4 mg (0.2 mmol) of 1,3-propanesulfonate, and refluxed at 80 °C for 36 h. After the reaction, the solid was obtained by rotary evaporation at 45 °C. The solid was continuously rinsed with trichloromethane, dispersed in trichloromethane, ultrasonicated to dissolve a small number of impurities, filtered, and dried to obtain the product. Yield: 80 mg (74%). 1H NMR (600 MHz, DMSO-d6): δ 9.39 (s, 1H), 8.93 (s, 1H), 8.18 (d, J = 6.1 Hz, 1H), 7.64 (d, J = 6.1 Hz, 1H), 7.29 (s, 1H), 6.53 (s, OH), 5.42 (s, 2H), 5.27 (s, 2H), 4.73 (s, 2H), 3.71 (t, J = 4.5 Hz, 2H), 2.85 (s, 6H), 2.53 (t, 2H), 2.0 (m, 2H), 1.87 (m, J = 14.2, 9.5, 4.7 Hz, 2H), 0.88 (t, J = 4.8 Hz, 3H); 13C NMR (150 MHz, DMSO-d6): δ 172.64, 156.98, 156.94, 150.18, 149.66, 145.59, 143.47, 133.22, 130.68, 129.09, 126.55, 122.18, 118.67, 108.50, 96.28, 72.51, 65.33, 50.62, 50.35, 48.57, 44.85, 42.65, 30.32, 28.97, 7.89; HRMS (m/z): [M–C3H7O3S]+ calcd. for C23H24N3O5, 422.1710; found, 422.1709.

Product quantification and identification

After electrolysis, the electrolyte was divided into two parts and extracted by dichloromethane and 1,2-dichlorobenzene, respectively. Dichloromethane extract was used for the detection of DMF, and 1,2-dichlorobenzene extract was used for the detection of TMDM. The final samples were further identified by GC-MS (Shimadzu GCMS-QP2020) and quantified by GC (Shimadzu GC-2018). Formate was quantified by 1H nuclear magnetic resonance (1H NMR) (ECZ600R, 600 MHz) using H3BTC as the internal standard. In detail, the mixture of 500 μL of electrolyte and 100 μL of D2O containing 10 mM H3BTC solution was used as the test sample.

Computational details for calculations

First-principles calculations based on density functional theory (DFT) were conducted using the Vienna ab initio Simulation Package (VASP). The projector augmented wave (PAW) method was employed to solve the Kohn-Sham equations, while the Perdew-Burke-Ernzerhof (PBE) generalized gradient approximation (GGA) described exchange-correlation interactions. The van der Waals interactions were incorporated into the standard DFT framework via the DFT-D3 dispersion correction. A 15 Å vacuum layer was introduced to eliminate the interaction between the periodically repeated structures. In this work, key computational parameters included: a 400 eV plane-wave cutoff energy, a 2 × 2 × 1 Monkhorst-Pack k-point grid, and convergence criteria of 10−5 eV (energy) and 0.05 eV Å–1 (residual forces). The density of states (DOS) was computed with Gaussian smearing (0.1 eV width). Free energy diagrams were generated via the computational hydrogen electrode (CHE) method. The Gibbs free energies were calculated at 298 K and 1 atm according to G = E + EZPE − TS, where E is the total energy, EZPE is the zero-point vibrational energy, T is the absolute temperature, and S is the entropy.