Introduction

Nanofiltration (NF), which utilizes size sieving and the Donnan effect as the primary separation mechanisms, is recognized as a promising membrane technology for ion-selective separation1,2,3. Despite its potential, further improvements in separation selectivity are still needed. Taking lithium extraction from salt lakes as an example4, interfering ions like Mg²⁺ (hydrated radius of 4.5 Å) exhibit a hydrated radius nearly identical to that of Li⁺ (hydrated radius of 3.8 Å)5. This similarity in hydrated radii poses significant challenges for efficient ion-selective separation by NF at the sub-nanometer scale6,7. Moreover, many brines have an Mg²⁺/Li⁺ mass ratio (MLR) greater than 20, and contain high levels of total dissolved solids (e.g., Na+ and Ca2+), which can interfere with the separation process and contribute to membrane fouling8. Such complexities are regarded as the primary obstacles hindering the efficacy of direct lithium extraction from brines by NF.

Strategies such as enhancing the positive charge of NF membranes, incorporating Li⁺ channels, and optimizing membrane pore size distribution have been proposed to improve the Li⁺/Mg2+ separation efficiency9,10,11,12,13. For instance, highly positively charged polyethyleneimine (PEI)-based membranes are claimed to exhibit strong electrostatic repulsion against Mg²⁺ compared to Li⁺, thereby enhancing Li⁺/Mg²⁺ separation performance via intensified Donnan exclusion14. The MgCl2 rejection of the PEI-based membrane can be as high as 97.4%. Additionally, a triplet quaternary ammonium monomer, engineered to carry a stronger positive charge, was polymerized with trimesoyl chloride (TMC), resulting in an NF membrane with enhanced positive charge density15. Recent studies have increasingly focused on strengthening the Donnan exclusion and modulating membrane structure through post-modification techniques (such as grafting ionic liquids or strong electrolytes) to further improve Li⁺/Mg²⁺ selectivity (\({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\))16,17,18,19.

We summarize literature data on the performance of NF membranes capable of efficiently separating Li⁺/Mg²⁺ mixtures, which are compiled in Fig. 1a. Positively charged membranes (i.e., isoelectric point (IEP) greater than 6) can achieve very high Mg²⁺ rejections but their Li⁺ rejections are moderate (from −10% to 80%). In comparison, negatively charged membranes (IEP < 6) can also achieve high Mg²⁺ rejection but with much lower Li⁺ rejection, while maintaining an \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) comparable to that of positively charged membranes. For two NF processes with the same MLR and high \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) but different ion rejections, high lithium purity can still be achieved. However, Li+ rejection determines lithium recovery, with low Li+ rejection leading to higher lithium recovery (Fig. 1b). Herein, lithium recovery is defined as the mass fraction of Li+ in the feed that is eventually recovered in the permeate, while lithium purity is defined as the mass fraction of Li+ cations in the permeate. Negatively charged dense NF membranes (with a molecular weight cutoff, MWCO < 300 Da) show better potential for Li⁺/Mg²⁺ separation than positively charged membranes in terms of Li+ rejection (Fig. 1a, b and Supplementary Figs. 1 and 2).

Fig. 1: Lithium separation performance and transport mechanisms in selective membranes.
figure 1

a Li+ and Mg2+ rejections of the membrane reported in the literature (data source available in Supplementary Table 1). Each dashed line connects data points from the same \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\). b Effect of \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) and ion rejections on lithium purity and lithium recovery. Schematic illustration of the c co-ion competition and d co-ion partitioning.

However, the research on positively charged NF membranes for Li⁺/Mg²⁺ separation has attracted increasing attention, driven by the conventional belief that co-ion competition benefits selectivity20. Specifically, when the positively charged membrane is used to separate Li⁺/Mg²⁺ mixtures, Li⁺, which is a co-ion (i.e., an ion with the same charge sign as the membrane), is more permeable than the competing co-ion Mg2+ due to the lower charge density and higher diffusional mobility of Li⁺ (Fig. 1c)21,22. The combined effect of co-ion competition and Donnan equilibrium results in a lower Li+ rejection in mixtures with Mg2+ compared to single LiCl solutions. Meanwhile, the significant difference in Li⁺ and Mg²⁺ rejection observed in their mixtures when using negatively charged NF membranes poses a challenge for existing theories. The conventional NF theory suggests that, in negatively charged dense membranes, the interception of Mg2+ induces a potential gradient that facilitates the transport of co-ions (Cl- in this case), which is then followed by the transport of counter-ions (Li⁺) with lower steric hindrance to maintain charge neutrality in the permeate23. Although co-ion partitioning theory supports the preferential partitioning of Cl⁻ in negatively charged membranes (Fig. 1d)24, the preferential permeation of Cl⁻ should, in principle, be more pronounced in positively charged NF membranes due to the electrostatic attraction between Cl⁻ and the membrane. However, this does not lead to a significant decrease in Li⁺ rejection for positively charged NF membranes (Fig. 1a). According to traditional filtration theory, co-ion competition occurs in charged membranes (Fig. 1c). However, for negatively charged NF membranes used in Li⁺/Mg²⁺ separation, Cl⁻ is the only co-ion present, with no competing co-ions. This raises a fundamental question: is there counter-ion competition between Mg²⁺ and Li⁺ in negatively charged membranes? A comprehensive theoretical framework is urgently needed to elucidate this phenomenon.

Furthermore, a membrane with a charge similar to the ions being separated is not a prerequisite for achieving high selectivity. For instance, biological ion channels, despite their negative charges, can achieve exceptionally high selectivity for Na⁺ or K⁺ through the synergistic effects of sub-nanometer pore size, optimal charge density, and specific binding sites25,26,27,28. Therefore, to investigate why negatively charged membranes are more effective for separating Li⁺ and Mg²⁺ in NF, we compare commercially available negatively charged NF membranes with self-prepared PEI-based NF membranes, both of which have been widely studied for lithium extraction from brines. Using a simple Li⁺/Mg²⁺ mixture as the feed, we systematically examine the impact of membrane charge properties on the separation behavior of Mg²⁺ and Li⁺. We conduct both experiments and simulations to evaluate the effects of co-existing cations and membrane structures on the Li⁺/Mg²⁺ separation performance of negatively charged NF membranes. We then investigate the impacts of MLR and solution pH on Li+ rejection in mixed salt systems. Finally, we extend the application of the negatively charged NF membrane to lithium extraction from brines, highlighting its advantages in separation efficiency. This study not only resolves the theoretical puzzle of ion competition mechanisms in selective transmembrane transport but also provides fundamental insights for developing advanced ion separation membrane materials with high selectivity.

Results

Ion separation performance of differently charged membranes

The cation separation performance of negatively charged membranes was tested against positively charged membranes using either the single Li⁺ solution or Li⁺/Mg²⁺ mixtures (with Cl- as the anion) by the cross-flow filtration. The NF membranes with different charge properties were either commercially available or custom-made through interfacial polymerization (Supplementary Table 2), with the custom-made membranes labeled PEINF1, PEINF2, and PEINF3. The influence of membrane permeability and separation layer thickness on ion separation performance was excluded to the greatest extent possible (Supplementary Figs. 3 and 4). The zeta potential measurements suggest that the IEP of commercial DK, DL, and NF270 membranes was all below 4 (Supplementary Fig. 5). Consequently, the rejections followed the typical order for negatively charged NF membranes: Na2SO4 > MgCl2 > NaCl > LiCl (Supplementary Fig. 6a)29,30. Among the PEI-based NF membrane, PEINF1, which exhibited an amine density 16 times higher than that of the DK membrane (Supplementary Fig. 6b), demonstrated strong positive charge characteristics (with an amine group density of 905 μmol m−2). Given its exceptional surface chemical properties, the PEINF1 membrane was employed as the representative sample of the PEINF series for all subsequent characterization and performance evaluation in this study.

During mixed salt filtration, negatively charged membranes (such as DK) showed excellent Li⁺/Mg²⁺ selectivity (Supplementary Fig. 7). Compared to the filtration of LiCl alone, the presence of Mg²⁺ in mixed salt filtration significantly reduced the Li⁺ rejection (Fig. 2a), with the most pronounced decrease observed when using the DK membrane (where the Li⁺ rejection decreased by 110%). Due to its small pore size, the DK membrane achieved a high rejection of Mg²⁺ (>90%) while achieving a negative rejection of Li⁺, indicating a marked ion competition effect (defined as ions with the same charge sign but different valence and size competing to pass through the membrane in a mixed salt solution). This ion competition effect was observed in all negatively charged membranes for the separation of divalent cations (Ca²⁺ or Mg²⁺) and monovalent cations (Na⁺ and Li⁺) in chloride salt systems, where the presence of divalent cations significantly reduced the rejection of monovalent cations (Supplementary Fig. 8). Conversely, the positively charged PEI-based NF membranes maintained high Li⁺ rejection even under co-ion competition (Fig. 2b). This trend is also evident in other commercial negatively charged NF membranes and reported positively charged NF membranes (Supplementary Fig. 9). Specifically, the presence of Mg2+ more readily reduces Li⁺ rejection in negatively charged NF membranes, except in cases where pore sizes are particularly small (see detailed discussion below). While compared with single salt NaCl filtration, the PEI-based NF membranes exhibited obvious ion competition in mixed NaCl/Na2SO4 filtration, where the introduction of SO₄²⁻ resulted in negative rejection of Cl⁻ (Fig. 2c and Supplementary Fig. 10). This indicates that lower-charged counter-ions (ions with opposite charges to the membrane) permeate more rapidly through the charged membrane in the mixture than in a single solution (Fig. 2d).

Fig. 2: Ion sieving performance of differently charged membranes.
figure 2

Ion rejections of (a) negatively charged membranes and (b) positively charged membranes during filtration of different ions (the mixed Li+/Mg2+ solution includes 15 mmol L−1 MgCl2 and 15 mmol L−1 LiCl). The inset represents an enlarged view showing finer details of the main figure. Dotted arrows serve as visual guidance. c Anion rejection of the DK and PEINF membranes under different solution conditions. The data are presented as mean ± standard deviations (SD), n = 3. Error bars in all figures represent SD calculated using the STDEV formula. d Schematic diagram of the rejection of different ion solutions by negatively charged NF membranes. Effect of e salt concentration and f ion composition on Li+ rejection of negatively charged membranes.

Previous studies have reported that counter-ions can adsorb onto the membrane surface, thereby reducing the effective membrane charge (Supplementary Figs. 11 and 12)31,32,33. In our experiments, negatively charged NF membranes exhibit high Li⁺ rejection (50-80%) in a single LiCl solution, with only a slight decrease as salt concentration increases (Fig. 2e). This suggests that the Donnan effect is not the dominant mechanism in Li⁺/Mg²⁺ separation, as electrostatic screening would otherwise significantly reduce Li⁺ rejection. Instead, the observed variations in Li⁺ rejection in response to changes in ion composition indicate the influence of an ion competition effect (Fig. 2f). The sharp decline in Li⁺ rejection observed in negatively charged membranes induced by the presence of Mg2+ cannot be explained by the previously proposed theory of preferential Cl⁻ partitioning. This is because, theoretically, the electrostatic attraction between positively charged membranes and Cl⁻ would promote Cl⁻ partitioning, resulting in a more significant reduction in Li⁺ rejection. However, compared to single-salt solutions, the Li⁺ rejection in mixed-salt solutions by positively charged membranes decreases much less than that by negatively charged membranes (Figs. 2a, b). Given that negatively charged NF membranes are employed for cation separation, we attribute this phenomenon to counter-ion competition (see the next section for further discussion). In conclusion, the counter-ion competition effect in negatively charged dense NF membranes significantly enhances Li⁺/Mg²⁺ separation in mixed salt solutions—an effect that cannot be fully explained by conventional theories, such as Donnan exclusion and Cl⁻ preferential partitioning in Li⁺ permeation.

Mechanism of counter-ion competition

Apart from the widely accepted Donnan effect, ion dehydration is often invoked to explain anomalous ion transport across membranes23,34. Here, we conducted molecular dynamic simulations to elucidate the interactions between Mg²⁺ and Li⁺ with the membrane, as well as key hydration structure parameters under various solution conditions, to reveal the interaction energies between the ions and the membrane (Fig. 3a). As the membrane charge transitions from negative (PIP-based membrane) to positive (PEI-based membrane) (Supplementary Fig. 13), the electrostatic interactions between the membrane and the cations vary from attractive to repulsive, thereby impeding the cations from approaching the membrane surface (Fig. 3b). This shift is notably accompanied by a differential concentration distribution of Mg²⁺ along the Z-axis (the direction normal to the membrane) near the membrane surface. Under the influence of strong electrostatic attraction, Mg²⁺ ions tend to accumulate on the surface of the PIP-based membrane (Fig. 3c). The pore size distributions of the PIP-based and PEI-based membranes in the simulation were deliberately matched (Supplementary Fig. 14) to exclude the influence of size exclusion on ionic diffusion.

Fig. 3: Theoretical calculation and analysis of ion transport mechanism.
figure 3

a Lateral view of the simulation box. The red, blue and white spheres represent O, N and H atoms, respectively. b Interaction energy between counter-ion and membrane. c Relative concentration of Mg2+ on the surface of PIP-based membrane and PEI-based membrane along the Z coordinate (the yellow area corresponds to the membrane location). RDF of oxygen in water molecules (OW) around Li+ within d PIP-based membrane and e PEI-based membrane. f Effect of Mg2+ concentration on RDF for Li+-OW. For the molecular dynamics simulation, different number Mg2+ were added into the simulation box to represent varying bulk concentrations. The red arrows show the downward trend. g Response mechanisms of ionic composition to ionic hydration structure.

We established the radial distribution functions (RDF, g(r)) between Li⁺ and the oxygen atoms of water (OW) in the mixed solution, with the peak intensities reflecting the number of water molecules within the ion hydration shells. The RDF was calculated for ions and OW at various locations. The RDF of Li⁺-OW has a significantly lower peak intensity as Li⁺ moves towards the surface of the negatively charged membrane (Fig. 3d), whereas an opposite trend was observed for positively charged membranes (Fig. 3e). This observation suggests that the structure of water molecules within the Li⁺ hydration shell is affected only when Mg²⁺ ions accumulate as counter-ions at the membrane surface. In other words, the accumulation of the divalent counter-ions (Mg²⁺) near the membrane surface leads to partial dehydration of the weakly hydrated Li⁺ (Supplementary Fig. 15). Correspondingly, we observed a further attenuation of the first hydration peak of Li⁺ with increasing Mg²⁺ concentrations in the separation with the negatively charged membrane (Fig. 3f). This phenomenon is primarily driven by the increased accumulation of Mg²⁺ near the membrane pores, which intensifies the competition for bound water molecules with Li⁺ (as illustrated in Fig. 3g). This dehydration effect not only reduces the size exclusion of Li⁺ but also potentially amplifies its electrostatic attraction to the membrane (Supplementary Fig. 16, with an increase of 21 kcal mol−1 in electrostatic attraction energy), resulting in enhanced Li⁺ permeation. The electrostatic attraction between the Li+ and membrane pore wall may overcome the dehydration energy barrier25, leading to further dehydration of Li+ and thus facilitating its transport through the channel. However, when the mean effective pore size of the negatively charged membrane is sufficiently small (e.g., the effective pore size of NF90 is 4.3 Å), the transport of dehydrated Li+ will be limited, resulting in a high Li+ rejection by the membrane (Supplementary Fig. 17). During the separation process, Mg²⁺, which is enriched in the confined space near the membrane surface, competes for water in the hydration shell of Li⁺, facilitating the penetration of Li⁺ through the negatively charged membrane. We refer to this phenomenon as counter-ion competition, which can also be regarded as counter-ion promotion in the context of ion-selective separation applications.

The counter-ion competition effect can be further intensified through the synergistic interplay of charge density and pore size35,36. Membranes with varying charge intensities were simulated by selectively deprotonating carboxyl groups, as illustrated in Fig. 4a. Although the deprotonation sites were chosen arbitrarily, they were deliberately concentrated on the membrane surface. The diffusion coefficients of ions in the LiCl/MgCl2 mixture in the confined space near the surface of the negatively charged membrane are reported in Fig. 4b. As the membrane becomes more negatively charged (from −78 to −244 mC m−2), the diffusion coefficient of Li⁺ in confined space near the membrane surface increases significantly (determined from the mean squared displacement (MSD) curves shown in Supplementary Fig. 18), indicating that Li⁺ enters the membrane pores more rapidly. Additionally, with the increase in membrane charge density, the strong attraction of cations with the negatively charged membrane leads to the accumulation of Mg2+ on the membrane surface, and accordingly, this strong adsorption restricts its diffusion on the membrane surface, resulting in a slight decrease in Mg²⁺ diffusion coefficient in confined space near the membrane surface. Notably, the differential interactions between the membrane and the cations amplify the disparity in diffusion coefficients between Li⁺ and Mg²⁺, with a larger difference corresponding to higher membrane selectivity.

Fig. 4: Investigation of the factors affecting counter-ion competition by molecular dynamics simulation.
figure 4

a 78 mC m−2 and 244 mC m−2 charged membranes with carboxylate end groups (red). Effect of b membrane charge and c pore size on diffusion coefficients of Li+ and Mg2+ in confined space near the membrane surface. Bulk solution was the LiCl/MgCl2 mixture. d Diffusion coefficient of Li+ in confined space near the membrane surface of NF membranes with different pore sizes. e Schematic illustration of the possible mechanism for Mg2+ density enhancing the Li⁺/Mg²⁺ separation in diffusion process.

Furthermore, the diffusion ability of counter-ions on the membrane surface is also influenced by the pore size of the PIP-based membrane (model shown in Supplementary Fig. 19). The smaller pores of the membrane exhibited a stronger resistance to Li⁺ diffusion, maintaining a low diffusion coefficient for Li⁺ even under counter-ion competition. Conversely, for membranes with larger pores, the weaker size exclusion allowed for a consistently high Li⁺ diffusion coefficient (Fig. 4c and Supplementary Fig. 20). Due to the strong size exclusion of Mg²⁺, there is no obvious difference in the diffusion coefficients across membranes with varying pore sizes. Only membranes with appropriately sized pores can leverage the counter-ion competition effect to amplify the difference in Li⁺ diffusion coefficients between single and mixed salt solutions (Fig. 4d and Supplementary Fig. 21), aligning with experimental observations (Supplementary Fig. 22). This highlights the critical role of the interplay between membrane charge and pore size in enhancing the counter-ion competition effect on the membrane surface. Due to the size (steric) exclusion, the strong electrostatic attraction between the membrane and the highly hydrated counter-ion (Mg²⁺) leads to the accumulation of Mg²⁺ ions on the membrane surface (pore entrance), causing the partial dehydration of the weakly hydrated counter-ion (Li⁺). This reduction in hydrated diameter of Li⁺, combined with increased electrostatic attraction, facilitates rapid permeation of Li⁺, thereby enhancing the \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) (Fig. 4e).

Effects of solution chemistry on counter-ion competition

The above analysis suggests that competitive ion dehydration emerges as the primary driving force behind the counter-ion competition effect, while the Donnan effect amplifies the facilitated permeation resulting from ion dehydration, as observed with Li⁺. Given the significant influence of pH, ion composition, and membrane charge on the Donnan exclusion37,38, we examined the impact of these three key factors on the counter-ion competition effect. The ionic rejection of the DK (negatively charged) and PEINF membrane (positively charged) was tested using a LiCl/MgCl2 mixture. The pH-dependent rejection of co-existing cations reveals a marked decrease in Li⁺ rejection (from 60.7% to only 7.7%) with the DK membrane when pH increased (from 2.5 to 5.5), while Li⁺ rejection as a co-ion on the PEINF membrane shows much substantially less decline (Fig. 5a, b). The deprotonation of amine groups on the polyamide active layer at higher pH enhances the electrostatic attraction between cations and the negatively charged membrane, thereby increasing the interfacial enrichment of Mg2+ and thus the dehydration of Li⁺. Both reduced size exclusion and enhanced electrostatic attraction due to Mg2+-enhanced dehydration facilitate Li⁺ ion permeation. For the positively charged membrane, the deprotonation of amine groups also reduces the electrostatic repulsion against Li⁺. However, the more pronounced decrease in Li⁺ rejection as a counter-ion for the negatively charged membrane emphasizes that the counter-ion competition effect plays a more significant role in membrane selectivity than the co-ion competition effect.

Fig. 5: Effect of solution conditions and membrane properties on the separation performance for differentiating Li+ and Mg2+.
figure 5

Effect of pH on the ionic rejection of (a) DK and (b) PEINF when filtrating 15 mmol L−1 MgCl2 and 15 mmol L−1 LiCl mixture. Variation of the ion rejections of (c) DK and (d) PEINF with respect to the MLR in the feed (Concentration: 2000 ppm). e Pore size, geometric standard deviation, ion rejection (Feed: 15 mmol L−1 MgCl2 and 15 mmol L−1 LiCl mixture) and zeta potential of the resulting membranes. f The optimized structure and corresponding calculated interaction energy between the membrane unit and ions. g Molecular snapshots and concentration profiles (the gray regions correspond to membrane locations). The data are presented as mean ± SD, n = 3.

We further investigated the separation performance of the NF membranes under varying MLR conditions. With a constant total salt concentration of 2000 ppm, increasing the MLR from 1:1 to 20:1 resulted in a reduction in Li⁺ rejection by the PEINF membrane from 39.3% to −12.7%, while the DK membrane exhibited a more dramatic change in Li⁺ rejection, decreasing from 33.5% to −53.2% (Fig. 5c, d). The negatively charged membranes yielded threefold higher \({S}_{{{Li}}^{+}/{{Mg}}^{2+}}\) than that of the positively charged membranes in high MLR solutions (Supplementary Fig. 23). This enhanced selectivity is primarily attributed to the fact that at high MLR, the increased concentration of Mg²⁺ on the surface of negatively charged membranes exacerbates the competition for water in the hydration shell of Li⁺. In contrast, for positively charged membranes, Mg²⁺ predominantly remains in the concentration polarization layer, preventing any competitive effect that would induce Li⁺ dehydration (Fig. 3e). Negative Li⁺ rejection in positively charged membranes only emerges at high MLR, where co-ion competition driven by Donnan equilibrium becomes significant (Fig. 5d). The notable discrepancy in Li⁺ rejection trends between positively and negatively charged membranes under high MLR conditions is challenging to rationalize using the theory of Cl⁻ preferential partitioning and its subsequent co-transport with Li⁺ (Fig. 1e). The significant enhancement in separation performance, promoted by the counter-ion competition mechanism, showcases the unparalleled advantages of negatively charged membranes in practical lithium extraction applications.

Effects of membrane properties on counter-ion competition

We also investigated the impact of membrane characteristics on the separation performance of Li⁺ and Mg²⁺ by fabricating negatively charged NF membranes with and without sulfonic groups (derived from sodium sulfanilate, SS, Supplementary Fig. 24 and Supplementary Table 3). In addition, dodecyl phosphate (DDP) is primarily used in the organic phase to narrow the pore size and sharpen the pore size distribution (Supplementary Fig. 25)23. The differences in Li⁺ rejection in mixed salt solutions for the membranes are illustrated in Fig. 5e and Supplementary Fig. 26. The presence of sulfonic groups results in a lower rejection towards Li⁺ (from −1.6% to −18.3%), although there is also a minor reduction in Mg²⁺ rejection. To understand this behavior, we analyzed the interaction energies of the PIP-TMC unit (without sulfonic groups) and PIP/SS-TMC unit (with sulfonic groups) with Mg²⁺ and Li⁺. Compared to the PIP-TMC unit, the interaction energies of Mg²⁺ and Li⁺ with the PIP/SS-TMC unit were notably more negative, at −379.4 kcal mol⁻¹ and −170.8 kcal mol⁻¹, respectively. This indicates a stronger affinity of the counter-ions with the sulfonic group-containing NF membranes (despite the PIP/SS-TMC membranes having slightly fewer negative charges, Fig. 5e). Additionally, divalent counter-ions like Mg²⁺ interact more strongly with the functional groups due to their higher charge compared to monovalent counter-ions like Li⁺. However, for Mg²⁺ mass transfer, the highly uniform NF membrane allows for high Mg²⁺ rejection (>90%) through size exclusion. The increased enrichment of Mg²⁺ on the membrane surface further promotes the dehydration of Li⁺. Moreover, the affinity of Li+ to sulfonic group modulates the diffusion and transport behavior of Li⁺ in solution and within the membrane, resulting in the membrane’s low rejection capability for Li⁺. Molecular snapshots and concentration profiles shown in Fig. 5g also indicate a higher concentration distribution of Li⁺ on and within the PIP/SS-TMC/DDP NF membrane. This result further confirms that stronger binding energies favor the transport of monovalent counter-ions within the membrane, endowing the membrane with excellent separation performance.

Proof-of-concept lithium extraction

To demonstrate the effectiveness of the negatively charged NF membrane in treating real lithium brine, a chloride-type brine (composition detailed in Supplementary Table 4) from Xinjiang was employed, with its main ionic composition presented in Supplementary Fig. 27. The separation performance of the negatively charged NF membrane was evaluated using this complex brine matrix (see experimental details in Supplementary Section 1.5 and Supplementary Fig. 28 of the Supporting Information). The high concentration of impurity ions, particularly Na⁺ (Supplementary Table 4), resulted in a Li+ rejection of approximately 20% (Supplementary Fig. 29). The presence of high Na⁺ concentration diminishes the Mg²⁺-induced dehydration of Li⁺ due to the lower hydration energy of Na⁺ compared to Li⁺, which makes Na⁺ more prone to dehydration than Li⁺ (Supplementary Table 5). Therefore, when a low concentration of Na+ (equivalent to the concentration of Li⁺, Supplementary Table 6) was introduced into the solution alongside Mg2+, the DK membrane showed a −116.4% rejection for Na+ (Supplementary Fig. 30). When the Na+ concentration is lowered to a level comparable to that of Li⁺, the competitive dehydration of Mg2+ against Li⁺ is re-established, resulting in a reduction in Li⁺ rejection (Supplementary Fig. 30). This phenomenon likely underpins the widespread use of NF as a post-processing step in selective adsorption technologies during lithium extraction from salt lakes. Importantly, the negatively charged membrane exhibited excellent antifouling ability against CaSO4 compared to the positively charged membrane (Supplementary Fig. 31). By minimizing Li⁺ rejection, negatively charged dense NF membranes not only maximize lithium recovery but also help maintain lithium purity during processing.

Discussion

In this study, we uncover an ion competition mechanism in NF membranes, driven by the counter-ion competition effect, which fundamentally reshapes our understanding of ion transmembrane selectivity. Using both commercially available and self-prepared NF membranes with varying charge characteristics, we demonstrate that charged membranes improve counter-ions separation during mixed-salt filtration. Specifically, the negatively charged membrane exhibits a 110% decrease in Li⁺ rejection upon the introduction of Mg²⁺, while SO₄²⁻ causes the positively charged PEINF membrane to shift Cl⁻ rejection from positive to negative. This phenomenon, where highly hydrated counter-ions reduce the rejection of weakly hydrated counter-ions in charged membranes, is termed the counter-ion competition effect. The counter-ion competition effect significantly enhances Li⁺/Mg²⁺ separation in negatively charged dense NF membranes, a behavior not easily explained by the traditional Donnan effect. Molecular dynamics simulations confirm the dehydration phenomenon during mixed-salt filtration, revealing that a thinner hydration layer reduces the size exclusion effect on Li⁺ and potentially strengthens its electrostatic attraction to the negatively charged NF membrane, thereby increasing Li⁺ permeability. Additionally, ion diffusion coefficient measurements suggest that the counter-ion competition effect can be further amplified by the synergistic interplay of membrane charge and pore size.

Thanks to the counter-ion competition effect, the negatively charged dense NF membrane demonstrates a three-fold increase in \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) in high MLR feed solutions compared to positively charged membranes. The combination of low Li⁺ rejection and high \({{{{\rm{S}}}}}_{{{{{\rm{Li}}}}}^{+}/{{{{\rm{Mg}}}}}^{2+}}\) enhance lithium recovery while maintaining lithium purity—an outcome more easily achieved with negatively charged dense NF membranes with controlled and uniform pore size. It is undeniable that under extremely acidic conditions (e.g., in spent lithium-ion battery recycling), the diminished (or even vanished) counter-ion competition effect may compromise the separation efficiency of conventional negatively charged polyamide NF membranes. Overall, this work uncovers an ion competition mechanism in NF membranes, offering practical insights for the development of advanced NF materials tailored for highly selective ion separation, particularly in lithium extraction from high-MLR salt-lake brines.

Methods

Membrane performance tests

A cross-flow filtration system (effective membrane area of 7 cm2, feed tank volume of 1000 mL, purchased from Hangzhou Saifei membrane Co. Ltd., Zhejiang, China) was employed to evaluate the NF separation performance. Before testing, all membranes were pre-compacted at 6 bar to ensure steady-state stability. Subsequently, 2 mL of permeate was collected for further characterization. The solute rejections (%) were tested under a constant pressure of 5 bar at 25 oC, and the cross-flow velocity was 40 L h-1. Rejection (%) was calculated as follows:

$${Rejection}\; (\%)=\left(1-\frac{{C}_{p}}{{C}_{f}}\right)\times 100$$
(1)

where \({C}_{p}\) and \({C}_{f}\) refer to the solute concentrations in the permeate and feed, respectively.

The separation factor of Li+ and Mg2+ was calculated by Eq. (2).

$${S}_{{{Li}}^{+}/{{Mg}}^{2+}}=\frac{\frac{{J}_{{Li}}}{{C}_{f,{Li}}}}{\frac{{J}_{{Mg}}}{{C}_{f,{Mg}}}}=\frac{\frac{{J}_{w}\times {C}_{p,{Li}}}{{C}_{f,{Li}}}}{\frac{{J}_{w}\times {C}_{p,{Mg}}}{{C}_{f,{Mg}}}}=\frac{\frac{{C}_{p,{Li}}}{{C}_{f,{Li}}}}{\frac{{C}_{p,{Mg}}}{{C}_{f,{Mg}}}}=\frac{1-\left(1-\frac{{C}_{p,{Li}}}{{C}_{f,{Li}}}\right)}{1-\left(1-\frac{{C}_{p,{Mg}}}{{C}_{f,{Mg}}}\right)}=\frac{(1-{R}_{{{Li}}^{+}})}{(1-{R}_{{{Mg}}^{2+}})}$$
(2)

where \({J}_{{Li}}\) and \({J}_{{Mg}}\) are the permeation rates of Li+ and Mg2+, respectively. \({J}_{w}\) is the water flux. \({R}_{{{Li}}^{+}}\) and \({R}_{{{Mg}}^{2+}}\) are defined as the rejection of Li+ and Mg2+, respectively. \({C}_{p,{Li}}\) and \({C}_{p,{Mg}}\) stand for the concentrations (mg L−1) of Li+ and Mg2+ in the permeate, respectively.

Computational simulations

All molecular dynamics simulations were performed by Materials Studio 2017/R2 modeling (Accelrys Inc.) with the COMPASS III force field. The electrostatic interactions were calculated using the Ewald summation method and the van der Waals interaction. The cross-linked polyamide membrane to be simulated was prepared via a heuristic approach, where the cross-linking of monomers occurred based on distance criteria39. Initially, the amine monomers and acyl chloride monomers were randomly placed within a computational box with periodic boundary conditions, followed by geometric optimization with a maximum of 5000 iterations. Subsequently, the cross-linking reaction was initiated by controlling the distance between the carbon atom of the acyl chloride and the nitrogen atom of the amine. The simulation was conducted at a temperature of 300 K and a pressure of 1 bar under Andersen thermodynamics within the NVT ensemble. It was assumed that an amide bond would form, and HCl would be generated when the distance between the nitrogen and carbon atoms was less than 2.5 Å. Additionally, the cutoff radius was incrementally increased by 1 Å until the cross-linking reaction ceased, ultimately stopping when the cutoff radius reached 12.5 Å40. After the cross-linking process, the unreacted amines as well as the resulting HCl were removed, and the unreacted acyl chloride groups were converted into carboxylic acid groups. The membrane underwent further geometric optimization for 5000 steps and was equilibrated for 1 ns in the NPT ensemble (at 300 K and 1 bar), followed immediately by the NVT ensemble (1 ns, 300 K, 1 bar). Following these steps, the pore size distribution of the equilibrated membrane was analyzed using the script. The equilibrated membrane was then used in subsequent diffusion simulations to calculate interaction energies and diffusion coefficients. In detail, a box containing a 30 Å vacuum layer was modeled, with the feed solution placed above the cross-linked membrane. The feed solution was prepared by introducing Mg2+ and/or Li+, Cl- and H2O. After structural optimization and equilibrium of the box, the membrane was fixed. Molecular dynamics simulations were performed in the NVT ensemble at 300 K, and the final snapshot was used for data analysis. Analysis involved the interaction energy between ions and the membrane, the density distribution of Mg2+ on the membrane surface, the RDF of Li+ around the OW, and the diffusion coefficient of ions.

The interaction energy calculation, reflecting the interaction strength among the selected system components, is given by25,41:

$${E}_{{{\mathrm{int}}}}={E}_{{total}}-\varSigma {E}_{{componet}}$$
(3)

where \({E}_{{total}}\) and \({E}_{{componet}}\) denote the total electronic energy of the system and the electronic energy of each individual component in the system, respectively. The negative \({E}_{{{\mathrm{int}}}}\) value implies a stronger interaction attraction between the selected molecules.

The diffusion coefficient of ions can be derived from MSD and calculated using an Einstein equation11,42:

$${MSD}=\frac{1}{N}{\sum }_{i=1}^{N}{\left[{r}_{i}\left(t\right)-{r}_{i}\left({t}_{0}\right)\right]}^{2}=A+6{D}_{a}t$$
(4)

where \(r\left(t\right)\) and \(r\left({t}_{0}\right)\) represent the position of a particle at time \({{{\rm{t}}}}\) and the initial time, respectively. \({D}_{a}\) is the diffusion coefficient, calculated by converting the slopes of the MSD versus time curve.

Characterizations

Zeta potential of the membrane surface was analyzed by the potentiometric analyzer (SurPASS, Anton Paar Co., Austria). The chemical compositions and structure of the active layer were examined by X-ray photoelectron spectroscopy (XPS, ESCALAB 250Xi, Thermo Fisher Scientific Co., USA). The structure of the fouled NF membrane was characterized by energy dispersive spectrometer analysis under 20 kV accelerated voltage by field emission scanning electron microscopy (S-4800, Hitachi, Japan). An inductively coupled plasma optical emission spectrometry (ICP-OES, iCAP PRO, Thermo Fisher Scientific Co., USA) spectrometer and ion chromatography with the anion exchange column (Metrosep A Supp5 – 250/4.0, Metrohm, Switzerland) were used for determining of cations and anions concentrations in feeds and permeates, respectively. The concentrations of neutral molecules were determined by the high-performance liquid chromatography coupled with a refractive index detector (HPLC-RID, Agilent 1100 series, USA).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.