The structure of electrolyte solutions under pressure at a molecular level is a crucial issue in the fundamental science of understanding the nature of ion solvation and association and application fields, such as geological processes on the Earth, pressure-induced protein denaturation, and supercritical water technology. We report the structure of an aqueous 2 m (=mol kg−1) MgCl2 solution at pressures from 0.1 MPa to 4 GPa and temperatures from 300 to 500 K revealed by X-ray- and neutron-scattering measurements. The scattering data are analyzed by empirical potential structure refinement (EPSR) modeling to derive the pair distribution functions, coordination number distributions, angle distributions, and spatial density functions (3D structure) as a function of pressure and temperature. Mg2+ forms rigid solvation shells extended to the third shell; the first solvation shell of six-fold octahedral coordination with about six water molecules at 0 GPa transforms into about five water molecules and one Cl− due to the formation of the contact ion pairs in the GPa pressure range. The Cl− solvation shows a substantial pressure dependence; the coordination number of a water oxygen atom around Cl− increases from 8 at 0.1 MPa/300 K to 10 at 4 GPa/500 K. The solvent water transforms the tetrahedral network structure at 0.1 MPa/300 K to a densely packed structure in the GPa pressure range; the number of water oxygen atoms around a central water molecule gradually increases from 4.6 at 0.1 MPa/298 K to 8.4 at 4 GPa/500 K.