Positively charged nanofiltration membranes have attracted much attention in the field of lithium extraction from salt lakes due to their excellent ability to separate mono- and multi-valent cations. However, the thicker selective layer and the lower affinity for Li+ result in lower separation efficiency of the membranes. Here, PEI-P membranes with highly efficient Li+/Mg2+ separation performance are prepared by introducing highly lithophilic 4,7,10-Trioxygen-1,13-tridecanediamine (DCA) on the surface of PEI-TMC membranes using a post-modification method. Characterization and experimental results show that the utilization of the DCA-TMC crosslinked structure as a space-confined layer to inhibit the diffusion of the monomer not only increases the positive charge density of the membrane but also reduces its thickness by ≈35% and presents a unique coffee-ring structure, which ensures excellent water permeability and rejection of Mg2+. The ion-dipole interaction of the ether chains with Li+ facilitates Li+ transport and improves the Li+/Mg2+ selectivity (SLi,Mg=23.3). In a three-stage nanofiltration process for treating simulated salt lake water, the PEI-P membrane can reduce the Mg2+/Li+ ratio of the salt lake by 400-fold and produce Li2CO3 with a purity of more than 99.5%, demonstrating its potential application in lithium extraction from salt lakes.