Owing to the complexity and heterogeneity of coal during pyrolysis, the ex situ analytical techniques cannot accurately reflect the real coal pyrolysis process. In this study, according to the joint investigation of Fourier-transform infrared spectroscopy (FTIR) and X-ray diffraction (XRD), the structural evolution characteristics of lignite-subbituminous coal-bituminous coal-anthracite series under heat treatment were discussed in depth. e results of the infrared spectrum of coal show that the different functional groups of coal show different changes with the increase of coal rank before pyrolysis experiment. Based on in situ infrared spectroscopy experiments, it was found that the infrared spectrum curves of the same coal sample have obvious changes at different pyrolysis temperatures. As a whole, when the pyrolysis temperature is between 400 and 500°C, the coal structure can be greatly changed. By fitting the infrared spectrum curve, the infrared spectrum parameters of coal were obtained. With the change of temperature, these parameters show regular changes in coal with different ranks. In the XRD study of coal, the absorption intensity of the diffraction peak (002) of coal increases with increasing coal rank. e XRD patterns of coal have different characteristics at different pyrolysis temperatures. Overall, the area of (002) diffraction peak of the same coal sample increases obviously with the increase of temperature. e XRD structural parameter of coal was obtained by using the curve fitting method. e changing process of two parameters (interlayer spacing (d 002 ) and stacking height (L c )) can be divided into two main stages, but the average lateral size (L a ) does not change significantly and remains at the 2.98 ± 0.09 nm. In summary, the above two technologies complement each other in the study of coal structure. e temperature range of both experiments is different, but the XRD parameters of coal with different ranks are reduced within the temperature range of less than 500°C, which reflects that the size of coal-heated aromatic ring lamellae is reduced and the distance between lamellae is also reduced, indicating that the degree of condensation of coal aromatic nuclei may be increased. Correspondingly, the FTIR parameters of coal also reflect that, with increasing temperature, the side chains of coal are constantly cracked, the oxygen-containing functional groups are reduced, and the degree of aromatization of coal may be increased.