The utilization of nanofiltration membranes for lithium extraction from Salt-Lake holds the potential to address lithium resource scarcity and drive energy transformation. Nevertheless, the trade-off effect between water permeability and Mg2+/Li+ separation selectivity poses a challenge in the application of these membranes. In this work, rigid-flexible interpenetration and competitive diffusion reaction strategies were proposed to regulate the pore structure and charge density of the functional layer, thus enhancing the overall separation performance of nanofiltration membrane. Phenylbiguanide (PBG) possessing rigid structure, high positive charge density, and low energy transfer barrier was embedded into flexible polyethyleneimine-based polyamide network. This integration facilitated the formation of continuous and semi-permanent microcavities with rigid-flexible coupled structure, and meanwhile, elevated the density of positive charges. Consequently, the modification extended the water molecular transport channels within the functional layer, leading to a notable enhancement in pure water flux, from 7.40 to 26.43 L m−2h−1. In addition, due to the faster diffusion of PBG than polyethyleneimine with high molecular weight (70000 Da, as aqueous monomer in this work), it could react with excess 1,3,5-trimesoyl chloride (TMC) on the surface of initial membrane to form a new polyamide layer, which repaired the defects in the functional layer and also enhanced the charge density inside pore channels. Therefore, Mg2+/Li+ separation selectivity factor increased from 3.79 of TFC membrane to 22.98 of PBG membrane, i.e., by about 6 times. This study provided an effective strategy to develop nanofiltration membranes with both good water permeability and Mg2+/Li+ selectivity.