Materials with the half-Heusler structure possess interesting electrical and magnetic properties, including potential for thermoelectric applications. MgAgSb is compositionally and structurally related to many half-Heusler materials, but has not been extensively studied. This work presents the high-temperature X-ray diffraction analysis of MgAgSb between 27 and 420°C, complemented with thermoelectric property measurements. MgAgSb is found to exist in three different structures in this temperature region, taking the half-Heusler structure at high temperatures, a Cu2Sb-related structure at intermediate temperatures, and a previously unreported tetragonal structure at room temperature. All three structures are related by a distorted Mg-Sb rocksalt-type sublattice, differing primarily in the Ag location among the available tetrahedral sites. Transition temperatures between the three phases correlate well with discontinuities in the Seebeck coefficient and electrical conductivity; the best performance occurs with the novel room temperature phase. For application of MgAgSb as a thermoelectric material, it may be desirable to develop methods to stabilize the room temperature phase at higher temperatures.