Escalating global water scarcity necessitates high-performance desalination membranes, for which fundamental understanding of structure–property–performance relationships is required. In this study, we comprehensively assess the ionization behavior of nanoporous polyamide selective layers in state-of-the-art nanofiltration (NF) membranes. In these films, residual carboxylic acids and amines influence permeability and selectivity by imparting hydrophilicity and ionizable moieties that can exclude coions. We utilize layered interfacial polymerization to prepare physically and chemically similar selective layers of controlled thickness. We then demonstrate location-dependent ionization of carboxyl groups in NF polyamide films. Specifically, only surface carboxyl groups ionize under neutral pH, whereas interior carboxyl ionization requires pH > 9. Conversely, amine ionization behaves invariably across the film. First-principles simulations reveal that the low permittivity of nanoconfined water drives the anomalous carboxyl ionization behavior. Furthermore, we report that interior carboxyl ionization could improve the water–salt permselectivity of NF membranes over fourfold, suggesting that interior charge density could be an important tool to enhance the selectivity of polyamide membranes. Our findings highlight the influence of nanoconfinement on membrane transport properties and provide enhanced fundamental understanding of ionization that could enable novel membrane design.