Piperazine (PIP)-based polyamide (PA) nanofiltration (NF) membranes exhibit limited rejection of divalent cations due to their negatively charged surfaces and insufficient compactness, restricting their broader application in various water treatment processes. To overcome this challenge, a novel strategy—stepwise increasing TMC concentration (SITC) during the interfacial polymerization (IP)—was proposed to optimize the PA layer structure. Conventional PA layer demonstrates a vertical diffusion structure: a compact barrier region underneath a thick and loose region. The regulatory goal of SITC is to enhance compactness while minimizing the increase in hydraulic resistance. The regulatory mechanism suggested SITC could regulate the IP reaction in both over time (throughout the IP process) and across the reaction region. During the initial IP stage, SITC reduced the reaction rate and increased PIP/TMC ratio in the bottom reaction zone, thereby improving the compactness and potential of final bottom barrier region. Thus, SITC can effectively restrict the permeation of cations, significantly increasing MgCl2 rejection from 33.70 % to 92.12 %. In the subsequent diffusion-limited stage, SITC enhanced the restriction on PIP diffusion, decreasing the thickness of the final upper loose region and surface potential. Those advantageous characteristics allowed the membrane to maintain a high rejection for Na2SO4 (>98.44 %). Concurrently, the membrane maintained a high water permeance (13.00 L·m−2·h−1·bar−1), attributed to the thin (16.69 nm) and optimized compactness distribution of its PA layer. This study provided a novel mechanism insight into the functional customization of NF membranes by decoupling the synthesis-property-performance relationship.