The heat capacities of LiNH2 and Li2MgN2H2 were measured by a modulated differential scanning calorimetry (MDSC) over the temperature range from 223 to 473 K for the first time. The value of heat capacity of LiNH2 is bigger than that of Li2MgN2H2 from 223 to 473 K. The thermodynamic parameters such as enthalpy (H–H298.15) and entropy (S–S298.15) versus 298.15 K were calculated based on the above heat capacities. The thermal stabilities of them were investigated by thermogravimetric analysis (TG) at a heating rate of 10 K min−1 with Ar gas flow rate of 30 mL min−1 from room temperature to 1,080 K. TG curves showed that the thermal decomposition of them occurred in two stages. The order of thermal stability of them is: Li2MgN2H2 > LiNH2. The results indicate that addition of Mg increases the thermal stability of Li–N–H system and decrease the value of heat capacities of Li–N–H system.