Introduction

Global wastewater volumes are projected to rise by ~25% by 2030 and up to 50% by 2050, driven by rapid population growth, urbanization, and industrial expansion. Key sectors such as agriculture, textiles, food processing, pharmaceuticals, and automotive manufacturing contribute heavily to both water consumption and pollution1. A major concern in industrial wastewater is the presence of harmful ions like nitrate (NO3), sulfate (SO₄2−), and bromide (Br), which pose serious risks to water quality, aquatic life, soil health, and infrastructure through corrosion and ecological imbalance2. These growing challenges highlight the urgent need for improved separation and purification technologies.

Traditional wastewater treatment methods, such as precipitation, ion exchange, filtration, adsorption, and thermal-based approaches like membrane distillation, have been widely used3,4,5,6,7. However, these methods come with limitations, including high costs, chemical dependency, complex equipment, and the production of toxic byproducts. To improve wastewater treatment efficiency, it is essential to adopt advanced technologies that balance technical feasibility, cost-effectiveness, and environmental sustainability. One promising solution is electrodialysis (ED) with ion-selective membranes, which can efficiently separate and recover specific ions from industrial wastewater8. By leveraging selective ion transport properties, ED systems improve water quality and enable resource recovery, making them a sustainable alternative. However, current ion-exchange membranes in ED still face significant challenges. A major issue with traditional membranes is the trade-off between ion flux and selectivity, which results from structural limitations9. Conventional membranes lack precise control over ion size, charge distribution, and hydrophilicity. Consequently, selectivity remains low, and energy consumption increases10. Additionally, the lack of well-defined ion transport pathways in these membranes hinders efforts to analyze and optimize performance.

To address these limitations, research has focused on developing advanced anion-selective membranes by incorporating functional materials such as zeolites11, metal-organic frameworks (MOFs)12, and covalent organic frameworks (COFs)13. While these materials show promise due to their ion selectivity and transport efficiency, challenges such as high synthesis costs, scalability, and instability in aqueous environments hinder their widespread use. For example, COFs require expensive raw materials and have scalability issues, while MOFs, despite their high selectivity, tend to be unstable in water-based applications14. Among polymeric membranes, anion exchange membranes (AEMs) play a critical role in selectively transporting anions, but enhancing their performance remains a complex challenge. The efficiency of AEMs largely depends on the chemical nature of the cationic head groups, their molecular structure, and how they are anchored to the polymer backbone. These factors influence the formation and stability of ion-conducting channels essential for membrane function. However, traditional AEMs are often plagued by excessive swelling when exposed to water, which can lead to pore collapse, reduced ion selectivity, and compromised mechanical stability15. To address these issues, researchers have explored several strategies such as cross-linking polymer chains, blending different polymers, forming acid-base pairs, and applying surface modifications16. Despite these efforts, none of these methods has successfully addressed the key challenges of achieving high selectivity, operational stability, and practical scalability together. While some techniques offer improvements in specific areas, a complete solution that meets both performance and manufacturing needs is still lacking. This highlights the need for a more integrated approach to membrane design that not only focuses on lab performance but also considers future application, cost, and scale-up challenges.

Here, we show that in-situ interfacial polymerization (ISIP) is a one-step, cost-efficient method for fabricating ion-selective membranes through integrated synthesis, eliminating the need for post-treatment. By incorporating design elements such as an ether-free polymer backbone, grafted quaternary ammonium groups, terminal -NH₂ groups for polyamide stabilization, and hydrolyzed -COOH groups for enhanced anion selectivity, ISIP overcomes key limitations of conventional approaches (Figs. 1 and  2a). The resulting membranes exhibit low resistance, rapid ion transport, and remarkable selectivity for weakly hydrated ions such as Cl, Br, and NO3 over strongly or moderately hydrated ions like SO42 and F, driven by electrostatic interactions. These membranes achieve high limiting current density >90 mA cm2, significant Cl flux, i.e., 1.98 mol m2 h1 at 5 mA cm2 and a high selectivity of 244 for Cl/SO42 system, confirming effective hydration control and robust performance for sustainable ion separation.

Fig. 1: A schematic shows a specialized polymer membrane fabricated via in-situ interfacial polymerization (ISIP) for selective monovalent ion separation using electrodialysis.
figure 1

Under a current density of 5 mA cm2 and an equimolar 0.1 mol L1 NaCl/Na2SO4 solution, the 7.03 cm2 membrane leverages electrostatic repulsion to enhance ion selectivity and separation efficiency, offering a promising approach for advanced desalination and ion separation.

Fig. 2: Membrane synthesis and characterization.
figure 2

a Synthetic pathway for PAB polymer, NML-Qx membranes, and NML-Qx-NH2 membranes. Membranes (Cl form) were subjected to ISIP surface modification, which occurs only on the membrane surface while the internal structure remains unchanged. b ¹H NMR spectra of the synthesized polymer (solvent: DMSO‑d6, 400 MHz), with detailed peak assignments corresponding to specific chemical structures, confirming the successful incorporation of desired functional groups. c ATR-FTIR spectra highlighting the key components of the quaternized membranes, including NML-Q3, NML-Q3-NH2, and the polyamide (PA) layer. The spectra provide evidence of successful functionalization and chemical modification at the membrane surface. d XPS survey spectra displaying the surface chemical composition of the NML, NML-Q3, and NML-Q3-NH2 membranes, confirming the presence and distribution of quaternized groups and amine functionalization on the membrane surface.

Results

NML-Q membranes for ion separation

The NML membranes were synthesized by functionalizing a hydrophobic PAB-based backbone with varying amounts of amines (Table S1), thereby introducing QA groups to enhance both the IEC and membrane hydrophilicity. The chemical structure of the NML-Qx polymer, in comparison with the PAB backbone, was confirmed through analysis of their 1H NMR and FTIR spectra (Figs. 2b, c and  S1,  S2). The pristine NML membrane, lacking QA groups, displayed negligible WU and was therefore characterized only after functionalization. As the amount of amine to PAB increases from 0.55 mmol to 1.10 mmol, the IEC improves from 0.35 mmol g1 to 0.62 mmol g1, demonstrating the successful grafting of QA groups. This increase in IEC is accompanied by a significant rise in WU values, from 4.21% to 16.96% and further to 30.04%, indicating enhanced hydrophilicity. After surface modifications, the IEC values showed an overall decreasing trend, except for NML-Q3-NH217. However, in this case, the reduction is more pronounced due to the formation of covalent bonds during surface crosslinking and the generation of -COOH groups. These -COOH groups serve as active functional sites, reducing IEC through electrostatic interactions with the oppositely charged QA groups, while also causing a slight increase in WU. The process for making NML-Qx membranes was limited to three membranes based on IEC and WU. Higher IEC raised WU, and too much WU could reduce selectivity. Therefore, it is crucial to maintain a careful balance between IEC and WU when designing ion-selective membranes18. We also tested the transport number (tCl), membrane resistance (RM), and limiting current density (LCD), correlating with membrane structure to optimize ED performance (Table S2). For example, the RM of the NML-Q2 and NML-Q3 membranes decreased from 3.82 Ω cm2 to 2.31 Ω cm2, indicating improved conductivity due to increased IECs, which also resulted in an increase in the tCl from 0.76 to 0.88. Despite the exclusion of NML-Q1 and NML-Q1-NH2 due to low IECs, the other base and modified membranes exhibited high LCD, enhancing ion flux at high current densities19,20,21,22. Based on the assessment of physical characteristics provided in Fig. S3, and Table S2, the NML-Q2-NH₂ membrane exhibited an optimal balance of high flux and selectivity. The membrane’s enhanced performance originates from its three-phase structure, comprising a hydrophobic region (PAB), an ionic phase (QA groups), and an auxiliary phase. In comparison, conventional ion exchange membranes (IEMs) typically exhibit a two-phase structure, consisting of a hydrophilic domain containing functional groups and a hydrophobic polymer backbone (Fig. S4). The inclusion of the auxiliary phase fundamentally alters ion transport behavior. In standard IEMs, selectivity is achieved by allowing counterions to migrate through the hydrophilic phase, while co-ions are excluded due to electrostatic repulsion. Increasing the density of charged groups in conventional IEMs to enhance ion flux often results in excessive water uptake (WU) and swelling, which compromises membrane integrity and reduces selectivity leading to a trade-off between flux and rejection. In contrast, the auxiliary phase introduced in this study, composed of -NH2 groups, promotes microphase separation within the membrane, facilitating the transport of small ions while hindering the passage of larger ones. This structural optimization enables high selectivity without sacrificing ion flux23,24. The presence of alkyl spacers is essential in this structure; without them, the Menshutkin reaction would generate only QA groups (hydrophilic phase). Balancing hydrophobic phase and ionic phase is vital, as excessive WU in the active may reduce selectivity. Therefore, careful control over modifications to membrane structure is essential for achieving optimal IEC, WU, and ion selectivity25.

Characterization of TMC-modified membranes

To assess the surface properties of the TMC-modified membranes, XPS was employed, which provides an effective detection depth of approximately 10 nm26. Representative results for three membranes (NML, NML-Q3, and NML-Q3-NH2) are presented in Fig. 2d. The presence of main elements such as C1s, N1s, Br 3 d, and O1s peaks observed at binding energies of 284 eV, 398.8 eV, and 530.7 eV, respectively27. Comparative analysis of these peaks in the modified membranes is summarized in Table S3 and Table S4, with detailed descriptions of element linkages within the membrane structure. The successful incorporation of amine groups through the quaternization process is evidenced by the increase in nitrogen content (0.36%, 0.48%, and 1.58% for NML-Q1, NML-Q2, and NML-Q3, respectively) as indicated by the N1s peak at 398.8 eV, and the corresponding decrease in oxygen content (14.78%, 13.92%, and 10.92%), which aligns with the enhanced IEC values of the membranes.

Additionally, AFM and SEM analysis were conducted to investigate the phase separation, surface roughness, and morphology of the prepared membranes, as shown in Figs. 3a–d and  S5S7. The membranes also appeared visually transparent and flexible, highlighting their practical handling and applicability (Fig. S8). The AFM images revealed distinct hydrophilic and hydrophobic domains, with dark regions representing hydrophilic domains and bright regions corresponding to hydrophobic domains. These hydrophilic regions, penetrating through the membrane, form ion channels essential for ion transport, while the hydrophobic domains contribute to structural stability and mechanical strength28,29. The phase separation observed in the NML-Qx membranes results from the interaction between the rigid aromatic backbone, pyridinium cation side chains, and flexible aliphatic filaments linked by -NH2 groups, which contribute to the distinct morphology of the membrane28. The surface roughness of the membranes was also measured to evaluate the changes induced by the ISIP process. The increase in roughness observed aligns with the potential benefits of enhanced permeability, as higher surface roughness increases the active surface area30,31. However, increased roughness also presents a potential drawback: membranes with greater roughness are more susceptible to fouling32. The surface roughness ranged from 1.032 nm to 1.139 nm, increasing slightly to 1.33–2.024 nm after surface modification, which is consistent with expectations for IP processes30,33. Notably, the roughness values observed in this study are lower than those typically reported for traditional IP processes, where the addition of a secondary monomer often results in greater surface irregularities. This relatively lower roughness is a positive aspect of the ISIP process, balancing improved permeability with reduced fouling risk.

Fig. 3: Characterization of NML-Q2 and NML-Q2-NH2 membranes.
figure 3

a, b AFM images, along with 3D surface insets, reveal distinct surface morphologies with nanoscale hydrophilic and hydrophobic domains. The NML-Q2-NH2 membrane exhibits increased surface roughness (1.887 nm) compared to NML-Q2 (1.037 nm), indicating enhanced surface features post-modification. c, d SEM images show smooth, uniform surfaces for both membranes, with no visible defects or agglomeration, confirming the precision of the fabrication process. e Mechanical properties of NML-Qx membranes: tensile strength (TS) and elongation at break (Eb) of NML-Q2-NH2 demonstrate improved mechanical integrity with higher TS (13 MPa) and moderate flexibility (Eb 3%) compared to the unmodified membranes. f Radar plot summarizes key performance metrics for NML-Q2-NH2, including WU, IEC, tCl, RM, and LCD. The balanced properties enable a combination of mechanical strength, ionic conductivity, and stability, making it suitable for electrochemical applications.

The SEM images showing that the membranes have a smooth and uniform morphology with minimal surface agglomeration.

The structural integrity is further supported by the mechanical properties, including tensile strength (TS) and elongation at break (Eb), which showed a non-uniform trend with WU (Fig. 3e). While both TS and Eb varied across the NML-Q membranes, alternating between increases and decreases with changes in hydration levels, the values remained sufficiently high to ensure mechanical stability for demanding applications like ED. For instance, the representative membrane, i.e., NML-Q2, exhibited the highest TS (13MPa) with Eb (3%). These results suggest that, despite minor fluctuations, the membranes maintain toughness, and dimensional stability, along with a balanced set of performance metrics summarized in the radar plot (Fig. 3f), including WU, IEC, tCl, RM, and LCD, all of which are required for high-duty ED processes.

Expanding on the structural and mechanical evaluations, we further studied the solubility of the membranes in various solvents, including DMF, DMSO, THF, DMAc, and NMP. Interestingly, the membrane (NML-Q2-NH2, 60 mg/3 mL) showed complete solubility at room temperature in all solvents except THF (Fig. S9 and Table S5). This solubility profile reflects the processability and scalability of the membrane fabrication (Fig. S10).

Electrokinetic and conductivity analysis

The zeta (ζ) potential, a crucial factor in determining membrane permselectivity, was measured for all membranes both before and after modification with TMC at pH 7.1, the relevant pH for the ED process of this study. The ζ potential increases from +1.3 mV to +3.74 mV, indicating enhanced positive charge due to the presence of QA groups (Fig. S11). However, modification with TMC and subsequent hydrolysis, the ζ potential shifted to negative values, i.e., −2.33 mV to −3.05 mV. The decrease in ζ potential is attributed to -COO⁻ groups, resulting from acyl group hydrolysis, which gives an anionic character to the membranes34. For instance, the negative ζ potential suggest an enhanced electrostatic repulsion for SO₄2−, the high charge density of which limits its transport across the membrane. Specifically, the NML-Q2-NH2 membrane, with a ζ potential of −3.05 mV, exhibits strong negative charge, providing significant repulsion for SO42 ions, while allowing monovalent ions. Additionally, the elevated ζ potential correlates with increased membrane resistance, offering deeper insights into how surface modification affects membrane transport properties and selectivity22. For example, the ζ potential of the NML-Q2-NH2 membrane became more negative after modification, and its resistance increased from 3.82 Ω cm2 to 7.4 Ω cm2. This suggests the -COOH groups neutralized the QA groups, leading to more restrictive ionic pathways. In case of NML-Q2-NH2, the more negative ζ potential means high increased resistance demonstrating a stronger barrier to SO42 ions35. However, the NML-Q3-NH2 membrane showed a slight decrease in ζ potential to −1.7 mV, due to the high content of QA groups. This reduction in ζ potential reflects the interaction between the QA and -COOH of the membrane after modification with TMC.

To further understand the transport behavior, we investigated their current-voltage (I–V) characteristics using the equipment as given in Fig. S12. The results are given in Fig. 4a (Fig. S13). The I–V curves displayed an Ohmic region (low current density, from 0 to approximately 0.5 V), the plateau region (current density remains nearly constant from 0.5 V to ~1.3 V), and the over-limiting region (sharp increase in current density above 1.3 V)36. In the Ohmic region, current density increases linearly with voltage, indicating efficient ion transport with minimal resistance. The NML-Q2 and NML-Q3 membranes showed high LCD, at 112 mA cm2 and 114 mA cm2, respectively. The plateau region, which extends up to around 1.3 V, is characterized by nearly constant current density, reflecting capacitive behavior due to surface modifications. As the IEC increases, the membrane’s capacitive nature enhances, resulting in higher resistance37. In the over-limiting region, current density increases sharply with voltage, often linked to water splitting and ion movement under concentration polarization. Surface modification with TMC enhances ion permselectivity by increasing RM, reducing LCD, and increasing susceptibility to concentration polarization. However, the modified membranes still maintained high LCD, suggesting that the TMC-based modifications did not significantly reduce these values (Fig. S13). By correlating the ζ potential with their I-V characteristics (Fig. 4a), we observe that -COOH groups likely influences anion transport due to electrostatic repulsion effects. There are notable differences in the characteristics of membranes made using the ISIP method and that of IP approach. The conventional IP method, which employs two monomers, results in the formation of nanometer-thick surface layer, leading to a large negative ζ potential. In contrast, the ISIP technique uses a single monomer, produces membranes with improved selectivity38. The high ζ potential led to swelling and reduced selectivity.

Fig. 4: Ion transport performance and molecular interactions of NML-Qx-NH2 Membranes.
figure 4

a Current-voltage (I−V) curves of NML-Qx and NML-Qx-NH₂ membranes, illustrating the impact of surface functionalization on conductivity. b Schematic representation of the ED setup using NML-Qx-NH2 membranes for selective separation of ions. The ED setup consists of two CEMs on either side of a central NML-Qx-NH2 membrane with a membrane area of 7.07 cm2. Ion transport is driven by an applied current density of 5 mA cm2. The electrolyte used is 0.3 mol L1 Na2SO4, with feed solutions of 0.1 mol L1 NaCl/Na2SO4, and 0.01 mol L1 KNO3 (except for NO3 tests, where deionized water is used). and (c, d) Ion flux and selectivity (S) for Cl⁻ and SO42 using NML-Qx and NML-Qx-NH2 membranes. The modified membranes show higher Cl⁻ flux and significantly enhanced Cl⁻/SO42 selectivity, demonstrating the effect of surface modification on monovalent ion transport. e Hydration energy versus ionic radius for F⁻, Cl⁻, Br⁻, NO3⁻, and SO42−, revealing the correlation between hydration properties and transport behavior. f Free energy profiles as a function of distance from the polymer center, showing preferential interaction zones for Na⁺, Cl⁻, and SO42 ions. Ion and water behavior in a polymer environment from MD simulations. g Radial distribution functions (G(r)) for SO₄²⁻ with different atomic groups, highlighting differential ion-polymer interactions. h Radial distribution functions (G(r)) for Cl⁻ with different atomic groups in the polymer, indicating specific interactions. i Comparison of Cl⁻/SO₄²⁻ selectivity normalized to ion flux for NML-Qx-NH₂ membranes with other reported membranes, demonstrating the high selectivity and transport efficiency achieved in this work.

Performance evaluation and stability

To evaluate permselectivity between mono- and divalent anions, the prepared membranes were tested via ED using two types of feed systems (ED setup as given in Fig. 4b). The first was a mixture of equimolar 0.1 mol L−1 NaCl and Na2SO4. The second was a mixture of 0.1 mol L−1 NaBr, NaCl, NaNO₃, NaF, and Na2SO4. The initial phase of the study focused on Cl/SO42 as a representative system. The results of NML-Qx and its modified version, NML-Qx-NH2, membranes are given in Fig. 4c, d. For comparison, the base membrane (i.e., NML) was tested, which does not have IEC; however, the pyridine nitrogen can still facilitate ion exchange under the influence of electric current. The NML membrane showed a Cl⁻ flux of 0.95 mol m2 h1, while the SO42 flux was 0.21 mol m2 h1, resulting in an ion selectivity of 4.6. As the IEC increased from 0.34 mmol g1 to 1.00 mmol g1, the ionic flux also improved. For example, compared to the base membrane, the Cl⁻ flux increased by 22% and 4.5% for NML-Q2 and NML-Q3, respectively, while the SO42 flux increased by 28% and 19%, with the highest permselectivity observed at 7.7. The increases in flux align with the trend in the IEC. As the ion flux increased with higher IECs, the divalent ion flux also increased, compromising permselectivity. To mitigate the rise in divalent ion flux, the IEC was controlled at 1.00 mmol g1 to maintain a balanced flux and permselectivity. This trade-off can be understood through the ion transport process, where adsorption on the membrane surface is crucial in determining permselectivity 39,40,41. Ion transport is significantly influenced by the Stokes radius of the ion (Table S6). For example, SO42, with a larger Stokes radius (2.31 Å), faces more resistance compared to Cl (1.21 Å)35. Another factor influencing ion flux is membrane hydrophilicity. As shown in Table S7, increased swelling ratio and decreased contact angle from NML-Q1 to NML-Q3 reflect improved water uptake and surface wettability, which support higher Cl⁻ transport. As previously reported by Li and Xu42, the hydration energy of SO42 ions (ca. 1145 kJ mol1) is much higher than that of Cl⁻ ions (317 kJ mol1), indicating that SO₄²⁻ is more strongly hydrated and thus less likely to adhere to the membrane surface (Fig. 4e). Moreover, Sata et al.43, also noted that membranes with hydrophobic surfaces have lower affinity for highly hydrated ions like SO₄²⁻. As the membranes are progressively modified (from NML-Q1 to NML-Q3-NH2), Cl⁻ ion flux increases substantially, accompanied by a significant rise in current efficiency from 50.47% in the unmodified NML to over 110% in NML-Q1-NH2 (Table S8). These enhancements demonstrate that structural and chemical modifications improve the membrane’s selectivity and transport efficiency for monovalent ions like Cl⁻. In addition, the energy consumption for Cl⁻ separation decreases notably with membrane modification from 1.36 kWh mol1 in NML-Q1-NH2 to just 0.57 kWh mol1 in NML-Q3-NH2 further confirming the efficiency gains achieved through surface modification (Table S9).

As the IEC increases, the transport of hydrophilic ions like SO42 is more significantly enhanced compared to Cl⁻, due to the stronger effect of IEC on ion flux, which leads to a reduction in permselectivity. Following surface modification, a significant change in ion transport behavior and permselectivity was observed. The flux of Cl⁻ increased up to 2 mol m−2 h1, whereas the flux of SO42 ions remained significantly lower. The optimized membrane (NML-Q2-NH2) achieved a Cl⁻ flux of 1.98 mol m2 h1, which was higher than that of the base membrane (1.34 mol m2 h1). Meanwhile, the SO42 flux was only 0.0081 mol m2 h1, and the permselectivity was observed to be 244.

To gain further molecular-level insight, MD simulations were performed to examine the transport and interactions of ions within a representative polymer system, which mimics the membrane structure (Fig. S14, and Table S10). First, the diffusion coefficients (D values) for water, Na⁺, Cl, and SO42 ions in the pure water system were established. Notably, SO42 showed a significantly lower diffusion coefficient compared to Cl. This aligns well with the observation that SO42 ion mobility through the membrane was lower compared to Cl⁻, due to its larger hydrated radius, which from a radial distribution analysis was found to be 0.358 nm, compared to 0.315 nm for Cl. This is also well aligned with the stronger interactions with the membrane surface, demonstrated by the lower free energy shown in Fig. 4f. When the polymer was introduced into the system, a general reduction in the mobility of all species was observed, with the D values for Cl and SO42 reduced to 49% and 29% of their baseline values, respectively. This hindrance was distinct for SO42, supporting the experimental finding that higher IEC levels, which increase membrane hydrophilicity, led to an increased flux of divalent ions like SO42. Free energy profiles were obtained from Boltzmann-weighted density profiles of the ions across the polymer-water phase, which reinforce the idea that larger and more hydrated ions like SO42 are more likely to interact and be retained in the polymer matrix, thus impacting their transport more significantly than smaller ions like Cl⁻. On the other hand, Na⁺, being a cation, experiences a higher energy barrier to enter the polymer gallery, likely due to repulsive electrostatic interactions with the QA group (Fig. 4f). The free energy profiles showed a more favorable interaction of SO42 with the polymer compared to Cl⁻, with higher IECs. This suggests that while higher IEC enhances the transport of more hydrophilic ions like SO42, it also leads to reduced selectivity, as the membrane surface becomes more receptive to these ions. The radial distribution functions (G(r)) for Cl with different atomic groups in the polymer (Fig. 4g) and for SO42 (Fig. 4h) clarify the differential ion-polymer interactions in the overall transport behavior. The combination of experimental results and MD simulations show that by increasing the IEC of the membranes improves the transport of hydrophilic ions like SO42, which compromise the selectivity. Hence, the ion size and hydration energy, play a critical role in governing ion transport and selectivity.

We compared our results with recent studies on monovalent anion-selective membranes (Fig. 4i). Unlike LbL and IP techniques, we controlled IEC and WU while grafting a small hydrophobic moiety with an -NH2 terminal group for polymerization. After the ISIP process, the acyl group was converted to −COOH, minimizing resistance while enhancing selectivity.

Table S11 provides a detailed summary of advancements in AEM technologies, showcasing various methods and their outcomes. The ISIP approach in this study demonstrates improved performance compared to other modification techniques reported elsewhere44. By selecting the best data from Table S11, results of the NML-Q2-NH2 membrane can be compared with other modification strategies, to emphasize the effectiveness of the ISIP process. For instance, polyelectrolyte multilayer deposition was used to modify commercial AEMs. However, the reported selectivity was only 1.81, which is relatively low45. Similarly, the electrodeposition technique was employed to decorate the AEM with a multilayer, but the reported membranes showed a selectivity of 2.1345. Another study used SPPO to modify commercial AEMs, achieving a permselectivity of 52.44 and high flux. The findings are promising, but the process is difficult to scale up due to the high cost of the commercial membranes (CMXs)46. In contrast, our method achieves a permselectivity of 244, showing a significant improvement, especially compared to sulfonated dopamine-modified membranes, which have a permselectivity of 34.0247.

To further evaluate the membrane’s long-term performance, a stability test of the NML-Q2-NH2 membrane was conducted at a current density of 5 mA cm2, using 100 mL volumes for both feed and recovery solutions to simulate continuous operating conditions. The results proved that the membrane maintained consistent flux and perm-selectivity over a 10-hour period (Fig. 5a).

Fig. 5: Ion flux and selectivity characteristics of NML-Qx-NH2 membranes under various conditions for different ion pairs.
figure 5

a Stability testing of NML-Qx-NH2 membranes over 10 operational cycles performed in 0.1 mol L1 NaCl/Na2SO4 solution at a current density of 5 mA cm−2 and a membrane area of 7.07 cm2. b Ion flux and selectivity of Cl/SO42 for NML-Qx-NH2 membranes. c Ion flux and selectivity of Br/Cl for NML-Qx-NH2 membranes, showing preferential transport of Cl⁻ and higher selectivity for the NML-Q3-NH2 membrane. d Ion flux and selectivity of NO3/SO42 for NML-Qx-NH2 membranes, emphasize enhanced NO3⁻ selectivity due to tailored surface interaction and hydration energy differences. e Ion flux and selectivity of NO3/Cl for NML-Qx-NH2 membranes, illustrating improved Cl⁻ transport with increasing surface optimization. f Ion flux and selectivity of Cl⁻/F⁻ for NML-Qx-NH2 membranes. g Comparative selectivity for F/SO42 and Br/SO42 systems, demonstrating the membrane’s ability to differentiate effectively between monovalent and divalent ions. h The dual-modified membranes exhibit higher Cl flux and improved selectivity. i ion flux and Cl/SO42 selectivity during continuous ED operation (1–3 h), indicating steady flux and sustained performance over time.

Ion transport in mixed solutions and stability

The transport characteristics of various ions Cl⁻, Br⁻, SO42, NO3⁻, and F⁻ were assessed for NML-Qx-NH2 membranes under a constant current density of 5 mA cm2 using a 0.1 mol L1 mixed ion solution. The experimental results, presented in Fig. 5b–g, reveal significant differences in flux across the membranes. It can be observed that the Cl⁻ ion showed the highest flux across all three membranes. Specifically, the flux of Cl⁻ increased significantly from NML-Q1-NH2 (0.39 mol m2 h1) to NML-Q2-NH2 (0.47 mol m2 h1), a 16.7% increase, and then surged in NML-Q3-NH2 (1.11 mol m2 h1), which was a 146.2% increase compared to NML-Q1-NH2. This large increase in Cl⁻ flux, particularly in NML-Q3-NH2, was due to high IECs of the NML-Q3-NH2 membrane, high IECs, lower resistance and provided more channels for ion transport. On the other hand, the flux of other ions showed some mixed trend; however, in all cases the flux of SO42 was lower because of the divalent trend, high hydration energy as discussed in the above section. The flux of SO42 in NML-Q2-NH2 was substantially lower (0.01 mol m2 h1), an 80% decrease from NML-Q1-NH2, where the flux was 0.05 mol m2 h1. This drastic decrease can be attributed to the larger hydrated radius due to high charge density, which makes it less mobile. This suggests that the membrane’s ability to restrict the active transport of SO42 ions is significantly enhanced. The flux of Br⁻ increased by 9.3% from NML-Q1-NH2 to NML-Q2-NH2, from 0.54 mol m2 h1 to 0.59 mol m2 h1. However, no further increase was observed in NML-Q3-NH2, where the flux remained at 0.59 mol m2 h1, suggesting that Br⁻ transport was not significantly influenced by further changes in the membrane properties (Fig. 5c). For NO3⁻, the ion flux showed a slight increase from 0.83 mol m2 h1 to 0.86 mol m2 h1 i.e., a 3.6% increase, but then decreased in NML-Q3-NH2 to 0.68 mol m2 h1, representing an 18.4% decrease from the initial value (Fig. 5d, e). We also investigated the F, which is smaller in size but has a higher charge density than other anions, but less than SO42 and therefore showed lower ion flux (Fig. 5f, g). For instance, the NML-Q1-NH2 membrane showed a value of 0.14 mol m2 h1 and this decreased to 0.12 mol m2 h−1. However, a small regain of 7.1% in NML-Q3-NH2 (with a flux of 0.13 mol m2 h−1) suggests the hydrophilic behavior also affects the flux of the F ion.

As discussed, the selectivity ratios of Cl⁻ relative to Br, SO42, NO3, and F, as well as the selectivity ratios of NO3, F, and Br⁻ relative to SO42 for the NML-Q1-NH2, NML-Q2-NH2, and NML-Q3-NH2 membranes, reveal important trends in ion separation. For the selectivity of Cl relative to other ions, the NML-Q2-NH2 membrane generally exhibits the highest selectivity. The NML-Q3-NH2 membrane exhibits high permeation for Cl⁻ ions compared to F and SO42 ions, with Cl/F and Cl/SO42 ratios of 8.37 and 28.79, respectively. However, its selectivity is lower than that of the NML-Q2-NH2 membrane, which has a selectivity ratio of 47. Looking at the selectivity of NO₃⁻, F, and Br⁻ relative to SO42, it shows that the NML-Q2-NH2 membrane has the highest selectivity for NO3⁻ over SO42, with a ratio of 84.99, significantly higher than NML-Q1-NH2 (15.92) and NML-Q3-NH2 (17.62). This indicates that the NML-Q2-NH₂ membrane is more effective at rejecting SO42 ions while allowing NO3⁻ ions to pass through. For F/SO42 selectivity, NML-Q2-NH2 also exhibits the highest ratio (11.55), indicating its high selectivity (Fig. 5g).

It is clear that the NML-Q2-NH2 membrane favors smaller, less hydrated anions such as Cl⁻, Br⁻, and NO3⁻ over more strongly hydrated ions like SO42. Although F⁻ is smaller in size, its moderate hydration energy (-580 kJ mol1) still contributes to lower permeability compared to other monovalent anions. This selectivity transport is likely driven by the membrane’s surface properties such as zeta potential, hydrophilicity, and in-situ production of -COOH groups, which demonstrate a significant increase in Cl⁻ transport and the reduction in SO42 flux.

The performance of membranes with both-sided modifications was also evaluated to enhance anion selectivity. The results reveal a significant trend in both ion flux and selectivity that are strongly influenced by the degree of crosslinking introduced during the modification process as given in Fig. 5h. A notable decrease in Cl⁻ flux and a corresponding increase in SO₄²⁻ flux (due to increase hydrophilicity of -COOH) were observed, which ultimately led to a sharp decrease in the overall selectivity of the membranes. The Cl flux for the dual side modified (D-NML-Q1-NH2) membrane was measured at 2.0 mol m2 h1, which then decreased to 1.6 mol m2 h1 in D-NML-Q3-NH2. This represents a 17% decrease in Cl flux, which is likely due to the dense membrane matrix on both sides. Conversely, the SO42 flux exhibited an increase from 0.06 mol m2 h1 in D-NML-Q1-NH2 to 0.15 mol m2 h1 in D-NML-Q3-NH2, a 129% increase. This increase in SO42 indicates that the membrane’s selective rejection is more dependent on the specific interactions between the membrane matrix and the ions, rather than simply on the size or charge of the ions. For instance, the selectivity for Cl⁻ flux over SO42 was 30.6 in D-NML-Q1-NH2, but this value dropped significantly to 11.0 in D-NML-Q3-NH2, representing a 64.0% decrease.

In Fig. 5i, the 1-hour value (1.90 mol m2) represents the amount of Cl⁻ transported during the first hour, while the 2-hour (3.87 mol m2) and 3-hour (6.44 mol m2) values reflect the transport over two and three hours, respectively. Since these are cumulative values, an increasing trend over time is expected. Importantly, the calculated flux rates (1.90–6.44 mol m2 h1) remain relatively steady, indicating stable transport behavior. Additionally, the SO42 transport remains minimal throughout the test (0.075–0.28 mol m2), and the Cl⁻/SO42 selectivity remains high (25.31 to 22.77), demonstrating consistent separation performance during the entire operation.

Additionally, we conducted various TMC concentrations to further explore its impact on membrane performance. These findings are presented in Fig. S15. The data show that ion selectivity was very high at 0.1 wt%, but as the concentration increased to 0.15 wt% and 0.2 wt%, both selectivity and ion flux declined. This is attributed to highly crosslinked surfaces and charge accumulation, which may hinder ion transport. These findings suggest that 0.1 wt% TMC is the optimal concentration; however, further detailed investigations are necessary to validate this conclusion.

Insights on ion transport via DFT calculations

DFT calculations were performed on a protonated and deprotonated discrete model molecule to derive atomic partial charges, which were critical for the molecular dynamics (MD) simulations, and electrostatic potential (ESP) charge analysis, as in Fig. 6a, b (details of the method are provided in Note S2). The ESP heat maps reveal a significant difference in charge distribution between the protonated (-COOH) and deprotonated (-COO) states of the model molecule, providing valuable insights into the ion transport mechanisms governing selective permeability. In the unmodified membrane, positive charges are primarily localized on the pyridinium units (QA), facilitating the transport of counterions (Fig. 6a). Following deprotonation, charge redistribution occurs, which could lead to partial delocalization of the negative charge over the large area of the model molecule, which contains anions with varying charge densities and hydration sizes. This distribution of negative charge generates electrostatic repulsion, particularly for larger divalent anions (Fig. 6b). As a result, the transport of these anions is hindered. On the other hand, smaller anions like Cl⁻, with lower charge density and a smaller hydration shell, experience less repulsion and can move more freely. Another key finding from the DFT calculations is that the deprotonation of the linker group and these structural changes narrowed the pathways on the surface. If translated to the membrane, such a modification affects the size and accessibility of ion transport channels. Consequently, the degree of deprotonation not only influences the electrostatic environment but, by extension, also affects the membrane’s overall morphology, which plays a pivotal role in ion selectivity.

Fig. 6: Structural and functional insights into crosslinked polymer membranes.
figure 6

a Crosslinked deprotonated polymer with bulky -COO groups near the surface, enhancing Cl⁻ permeability and repelling SO₄² through electrostatic effects. b Protonated crosslinked polymer adopting a compact conformation due to reduced electrostatic repulsion (heat map range: +0.224e₀ to −F0.224e₀). c Base (non-crosslinked) polymer showing minimal anion selectivity during ion transport. d Crosslinked polymer enabling selective transport Cl⁻ passes freely, while SO42 is effectively rejected, demonstrating improved monovalent ion selectivity.

Discussion

In conclusion, the development of MAPMs using the ISIP technique marks a significant advancement in selective ion separation technologies. This study demonstrated the successful fabrication and functionalization of MAPMs by introducing amine (-NH₂) and cationic groups into the membrane structure, forming a crosslinked polyamide structure with TMC. The modified membranes exhibit a dense, negatively charged surface that enhances their permselectivity, as confirmed by zeta potential measurements and ATR-FTIR analyzes. Specifically, the ATR-FTIR spectra revealed the formation of characteristic amide linkages, aromatic frameworks, and carboxylic acid (-COOH) groups, all of which contribute to the observed improvements in membrane performance. The performance evaluation highlighted the remarkable properties of these membranes, such as a high limiting current density of over 90 mA cm2, a low membrane resistance of 4.7 Ω cm², and a substantial Cl⁻ flux of 2.1 mol m2 h1. These findings, combined with a high selectivity of approximately 244 for Cl/SO₄2, emphasize the effectiveness of the membranes in discriminating against larger, more hydrated ions like SO₄2 while favoring smaller ions such as Cl⁻. Selectivity for other anions, including Br, F, and NO₃, was also demonstrated, further validating the robustness of the ISIP process for achieving targeted ion separation. The NML-Qx-NH₂ membranes consistently showed higher selectivity for Cl⁻ and Br, driven by surface characteristics such as increased hydrophilicity, negative zeta potential, and the functional presence of -COOH groups. These results establish ISIP-based MAPMs as a highly promising solution for efficient and selective ion separation, with potential applications in water desalination, energy storage systems, and industrial separation processes. The scalability and precision of the ISIP method offer a pathway to optimizing membrane properties for specific ions, paving the way for further research and innovations in advanced membrane technology.

Methods

Materials

All chemicals used were of analytical grade. Biphenyl, 4-acetylpyridine, trifluoromethanesulfonic acid (TFSA), and trifluoroacetic acid (TFA) were obtained from Saan Chemical Technology Co., Ltd., in Shanghai, China. 3-Bromopropan-1-amine was supplied by Shanghai Aladdin Biochemical Technology Co., Ltd., also in Shanghai, China. Sodium Cl⁻ (NaCl), sodium fluoride (NaF), sodium bromide (NaBr), sodium nitrate (NaNO₃), sodium sulfate (Na₂SO₄), potassium nitrate (KNO₃), N-methyl-2-pyrrolidone (NMP), dichloromethane (DCM), trimesoyl chloride (TMC), and dimethyl sulfoxide (DMSO) were purchased from Sinopharm Group Chemical Reagent Co., Ltd., based in Beijing, China. The cation exchange membrane (CEM) and monovalent anion permselective membrane (ACS) were acquired from ASTOM, located in Tokuyama Soda, Japan.

Preparation of poly (alkyl-biphenyl pyridine) (PAB)

To synthesize PAB, biphenyl (6 g, 38.9 mmol) and 4-acetylpyridine (6.3 g, 52.06 mmol) were combined in a flask in a molar ratio of 1:1.34, along with dichloromethane (10 mL), and mechanically stirred for 20 mins. Under ice bath conditions, 2 mL of trifluoroacetic acid (TFA) and 22 mL of trifluoromethanesulfonic acid (TFSA) were slowly added to the reaction mixture. The mixture was stirred at 0 °C for 2 h, then allowed to stir at room temperature for 24 h. During this period, the solution gradually developed a purplish-red color. The resulting purplish-red solution was carefully poured into deionized water, leading to the formation of a yellow-fibrous precipitate. The product was stirred in a 1 mol L1 NaOH solution for 24 h to neutralize any residual acid and ensure complete deprotonation of the polymer. Afterward, the polymer was filtered and thoroughly washed with deionized water to remove any remaining impurities. The deprotonated (PAB) was then dried at 40 °C for 24 h.

Quaternization of PAB polymer

For the quaternization, PAB (2.15 mmol) was first dissolved in 9 mL of DMSO at 25 °C. Various amounts of amine, as shown in Table S1, were added to control the IEC values. The reaction was carried out at 70 °C for 12 h. The membrane was prepared using the solution casting method. After the quaternization reaction, the polymer solution was filtered through a 0.5 µm syringe filter and cast onto a clean glass plate, with the edges sealed using ~0.1 mm thick transparent insulation tape to prevent outflow. The cast film was dried at 60 °C for 6–7 h to fully evaporate the solvent. The dried membrane was then gently detached by soaking in water, thoroughly washed, and converted to the Cl form by immersing it in a 0.5 mol L1 NaCl solution for 24 h.

For comparison, a reference membrane (NML) was prepared using the same method without amine addition, meaning no quaternization occurred.

In situ surface-crosslinking

Each membrane in Cl form (10 × 12 cm) was securely held in a specially designed holder to ensure surface modification occurred on only one side. The holder was engineered to maintain a firm grip on the membrane. To initiate surface modification, various solutions of TMC 0.1 wt%, 0.15 wt%, and 0.25 wt% were poured onto the membrane surface. After 180 seconds, the membranes were washed three times with n-hexane to remove any unreacted TMC. The membranes were then placed in an oven and dried at 60 °C for 5 min. After drying, the membranes were hydrated to convert any remaining unreacted acyl groups into -COOH groups. To further assess the ISIP process and surface tuning effects on ion selectivity, both sides of the membranes were modified. A membrane piece was immersed in TMC solution for 3 min, then dipped in n-hexane 2–3 times to remove unreacted TMC. The hydrated membranes were then characterized and tested for application.

Membrane characterization

The surface characteristics of the NML-Qx membranes were comprehensively analyzed and compared to the base membranes using multiple techniques. X-ray photoelectron spectroscopy (XPS) with an Al Kα X-ray source (Thermo ESCALAB250, USA) and atomic force microscopy (AFM, Multi-Mode V, USA) provided insights into their surface composition and topography. The presence of functional groups such as amide linkages and -COOH groups was confirmed through attenuated total reflectance–Fourier transform infrared (ATR-FTIR) spectroscopy (Vector 22, Bruker) over the spectral range of 4000–650 cm1. Additionally, zeta potential measurements, performed using the SurPASS electrokinetic instrument (Anton Paar Trading Co., China), offered valuable information on the membranes’ surface charge characteristics48. Static water contact angles were measured at room temperature using an Ossila Goniometer with a 0.47 mm blunt needle. Values are reported as mean ± standard deviation from multiple measurements.

Ion exchange capacity

The ion exchange capacity (IEC) of the membranes was measured using Mohr’s method. Dry membranes were accurately weighed and converted to the Cl⁻ form by immersing them in a 1.0 mol L1 NaCl solution for 24 h. Subsequently, the membranes were thoroughly rinsed with deionized water to remove excess salt and immersed in a 0.5 mol L1 Na₂SO₄ solution for 48 h to release Cl ions. The released Cl⁻ ions were titrated with a 0.01 mol L1 AgNO₃ solution, using K₂CrO₄ as the indicator. The IEC (mmol g1) was then calculated using Eq. 1.

$${{{\rm{IEC}}}}=\frac{\left({V}_{{{AgNO}}_{3}}\times {C}_{{{AgNO}}_{3}}\right)}{{W}_{{dry}}}$$
(1)

where Wdry (g) is the weight of the dried membrane, V (mL) is the volume of the AgNO₃ solution, and C (mol L1) is the molar concentration of the AgNO₃ solution.

WU and swelling ratio (SR)

The WU was measured by soaking the membranes in water for 24 h and then weighing them as W2. The membranes were then dried at 60 °C for 12 h and re-weighed as W1 (dried membrane). The WU of the membranes was calculated using the following Eq. 2:

$${{{\rm{WU}}}}=\frac{\left({W}_{2}-{W}_{1}\right)}{{W}_{1}}\,\times \,100$$
(2)

W1 and W2 represent the weight of the dried and wet membrane, respectively.

The swelling ratio (SR) was calculated using Eq. 3 as the area difference between wet (Swet, cm²) and dry (Sdry, cm²) membrane samples.

$${{{\rm{SR}}}}\left(\%\right)=\frac{{S}_{{wet}}-{S}_{{dry}}}{{S}_{{dry}}}\times 100$$
(3)

Transport number (t Cl )

The transport number (tCl) of the membranes was measured using a two-compartment cell. The membrane sample was held between two compartments containing NaCl solutions of different concentrations, i.e., 0.01 mol L1 and 0.05 mol L1, respectively. The potential difference generated across the membrane was observed with a multimeter attached to two Ag-AgCl electrodes. The tCl of Cl was calculated using the Eq. (4) (Nernst equation) as follows:

$${{{{\rm{E}}}}}_{{{{\rm{m}}}}}=\frac{{RT}}{{zF}}\left({2t}_{i}-{{{\bf{1}}}}\right){{\mathrm{ln}}}\frac{{a}_{1}}{{a}_{2}}$$
(4)

Em (in volts) is the membrane’s potential, R is the universal gas constant, T is the absolute temperature (K), F (Faraday constant), and z (ion charge = 1 for Cl); whereas a1 and a2 are the activities of the electrolyte in the solutions, respectively.

Current-voltage (I–V)

The current-voltage (I–V) curves were obtained by a four-compartment apparatus using 0.5 mol L1 NaCl and 0.3 mol L1 Na2SO4 solutions, respectively. The current was increased progressively using a potentiostat/galvanostat (WYL1703, Hangzhou Siling Electrical Instrument Ltd.) and the voltage drop across a membrane (with an effective area of 3.2 cm2) was observed with a multimeter attached with a pair of Ag-AgCl electrodes.

Anion perm selectivity

The membrane’s anion permselectivity was measured using a lab-made ED setup in which the membrane sample was seized in the center of the ED stacks and the modified surface was facing the diluted chamber. CMX were clamped on either side of the modified membrane to allow the electromigration of cation to fulfill the principle of electroneutrality. The diluted compartment was filled with 100 mL solution containing equimolar (0.1 mol L1) of NaCl and Na2SO4, while the concentrated compartment was filled with a 100 mL of 0.01 mol L1 KNO3 solution, respectively. In the electrolyte compartment, 100 mL of 0.3 mol L1 Na2SO4 solution was used. Each solution was pumped continuously via peristaltic pumps with a flow rate of 20 mL min1 to avoid concentration polarization. A constant current density of 5 mA cm2 was used to initiate the electromigration of ions across the membrane. After 1 h running time, the concentration of Cl was tested by titrating with 0.01 mol L1 AgNO3, while the SO42 was tested using the ICP analysis (ICP-AES, Optima 7300 DV, USA). The flux Ji (mol m2 h−1) of the anions was calculated using the following Eq. (5):

$${{{{\rm{J}}}}}_{{{{\rm{i}}}}}=\frac{\left({C}_{t}-{C}_{i}\right)\,.\,V}{{A}_{m}.\,t}$$
(5)

V is the volume (0.1 L), Ct and Ci represent the final and initial molar concentration (mol L1) in the concentrated compartment, t is the time (hour), Am is the effective area (m2) of membrane. The perm selectivity of the membrane was calculated using the following Eq. (6):

$${{{{\rm{P}}}}}_{{{{{\rm{SO}}}}}_{4}^{2-}}^{{{{{\rm{Cl}}}}}^{-}}=\frac{{t}_{{{Cl}}^{-}}/{t}_{{{SO}}_{4}^{2-}}}{{C}_{{{Cl}}^{-}}/{C}_{{{SO}}_{4}^{2-}}}=\frac{{J}_{{{Cl}}^{-}}}{{J}_{{{SO}}_{4}^{2-}}}$$
(6)

\({C}_{{{Cl}}^{-}}\) and \({C}_{{{SO}}_{4}^{2-}}\) are the molar concentration of NaCl and Na2SO4, respectively (0.1 mol L1). Whereas, \({t}_{{{Cl}}^{-}}\) and \({t}_{{{SO}}_{4}^{2-}}\) are the transport numbers of Cl and SO42, respectively.

The current efficiency was calculated using Eq. (7)49:

$${{{\rm{Current}}}}\; {{{\rm{Efficiency}}}}\,({{{\rm{\eta }}}}\%)=\left(\frac{{z}_{i}{FV}{\Delta C}_{i}}{{It}}\right)\times 100$$
(7)

where (∆Ci) is the change in ion concentration (mol L1), zi is the ion charge, F is Faraday’s constant (C mol1), V is the volume of solution (L), I is the current (A), and t is time (s). Moreover, energy consumption (E) per mole of ion was calculate for according to the Eq. (8)50:

$${{{\rm{Energy}}}}\; {{{\rm{consumption}}}}\,({{{\rm{E}}}})\,{{{\rm{per}}}}\; {{{\rm{mole}}}}\; {{{\rm{of}}}}\; {{{\rm{ion}}}}=\frac{\,\int V.I.{dt}}{({C}_{i}-{C}_{t}).V}\,$$
(8)

where V is the voltage drop across the membrane (we assumed 12.5 V), I is the applied current (0.036 A), dt (s) is the time change, and Ci and Ct are the concentrations of ion initially and at a specific time t (s).