Time and temperature resolved X-ray diffraction was used for thermal analysis. Series of diffraction patterns were measured, while the samples are heated/cooled stepwise or isothermally with freely selectable temperature programs. The method was applied for the investigation of the phase transitions of ammonium nitrate and HMX (1,3,5,7-tetranitro-1,3,5,7-tetraaza-cyclooctane), when the identification of phases was required. Its capability in the field of kinetics is demonstrated with the isothermal investigation of the solid state reaction of ammonium nitrate with copper oxide and the non-isothermal investigation of the high temperature corrosion of nickel, which was performed by means of a difference procedure. For obtaining structural details peak fitting and Rietveld refinement were applied for the investigation of ammonium nitrate and HMX.