The crystal structure transformation and step-by-step thermal decomposition behavior of dihydroxylammonium 5,50 -bistetrazole-1,1 0 -diolate (TKX-50) under thermal stimulation were studied and the whole process included thermal expansion, primary decomposition and secondary decomposition.The thermal expansion and primary decomposition of TKX-50 were studied using in situ powder X-ray diffraction (in situ XRD) together with Rietveld refinement, by which the crystal structure transformation process can be accurately traced. The results showed that the thermal expansion of TKX-50 was anisotropic. In particular, the a-axis exhibited a negative thermal expansion (NTE) that may be attributed to the distortion of the six-membered ring, which results in H-transfer between the cation and dianion.The crystal structure of the intermediate product after primary decomposition was also obtained. The secondary decomposition process was analysed using thermogravimetric-differential scanning calorimetry (TG-DSC) due to the safety risk of TKX-50 analyzed by in situ XRD. The crystal structure transformation process from TKX-50 to the intermediate product under heat stimulation was deduced.Meanwhile, the morphological change of the whole process was obtained using hot stage microscopy (HSM). Combined with TG-FTIR technology, the gaseous decomposition products at each step were analysed and the thermal decomposition mechanism of TKX-50 was proposed. This study further reveals the thermal decomposition behavior of TKX-50 and is helpful for better understanding the thermal decomposition mechanism.