The investigation of salts in water at extreme conditions is crucial to understanding the properties of aqueous fluids in the Earth. We report first principles (FP) and classical molecular dynamics simulations of NaCl in the dilute limit, at temperatures and pressures relevant to the Earth's upper mantle. Similar to ambient conditions, we observe two metastable states of the salt: the contact (CIP) and the solvent-shared ion-pair (SIP), which are entropically and enthalpically favored, respectively. We find that the free energy barrier between the CIP and SIP minima increases at extreme conditions, and that the stability of the CIP is enhanced in FP simulations, consistent with the decrease of the dielectric constant of water. The minimum free energy path between the CIP and SIP becomes smoother at high pressure, and the relative stability of the two configurations is affected by water self-dissociation, which can only be described properly by FP simulations.