The phase stability of epsomite under a high temperature and high pressure were explored through Raman spectroscopy and electrical conductivity measurements in a diamond anvil cell up to ~623 K and ~12.8 GPa. Our results verified that the epsomite underwent a pressure-induced phase transition at ~5.1 GPa and room temperature, which was well characterized by the change in the pressure dependence of Raman vibrational modes and electrical conductivity. The dehydration process of the epsomite under high pressure was monitored by the variation in the sulfate tetrahedra and hydroxyl modes. At a representative pressure point of ~1.3 GPa, it was found the epsomite (MgSO4·7H2O) started to dehydrate at ~343 K, by forming hexahydrite (MgSO4·6H2O), and then further transformed into magnesium sulfate trihydrate (MgSO4·3H2O) and anhydrous magnesium sulfate (MgSO4) at higher temperatures of 373 and 473 K, respectively. Furthermore, the established P-T phase diagram revealed a positive relationship between the dehydration temperature and the pressure for epsomite.