In situ high-temperature and high-pressure XAFS experiments were performed at the Ni K-edge, at the ID22 μ-beamline of the ESRF (Grenoble, France). The experimental setup consists of an externally heated "Bassett-modified" hydrothermal diamond-anvil cell. The sample chamber is loaded with a water-saturated haplorhyolitic glass: (NaAlSi3O8)47(KAlSi3O8)21(SiO2)32, together with an aqueous NiCl2 solution (0.35 M) and an air bubble. The experiment is carried out to a temperature (T) of 780 °C, and the corresponding hydrostatic pressure (P) is calculated to be around 520 MPa, based on the equation of state of water. μ-XANES spectra are then collected in situ in the silicate melt and in the aqueous phase. Spectroscopic data are first interpreted in terms of speciation. At the experimental P-T conditions, nickel is essentially four-coordinated in the hydrous melt, whereas its coordination is 5 in the glass. Moreover, based on the theoretical description of the absorption edge, the XANES spectra are used to derive the "fluid/melt" partitioning coefficient for nickel (0.22 ± 0.05), as well as the density of the hydrated melt (0.9 ± 0.5 g/cm3).