Clarifying the microscale reaction mechanism of macerals is crucial for achieving efficient thermal utilization of coals. Herein, we analysed the chemical structures of two coals used in coking for their macerals employing 13C NMR, FTIR, and XPS to build molecules. The pyrolysis behaviours of coals and their macerals were accessed through molecular dynamics of calculating chemical bond characteristics. Results show that inertinite with higher maturity is rich in aromatic, vitrinite with stronger thermal-reactivity is rich in aliphatic, and macerals of coking and gas coal have more advantages in hydrocarbon generation and branch-chain development, respectively. Based on the validated and optimized molecules containing C, H, O, and N elements, it is found that not only the bond lengths of the longest and shortest in macerals from gas coal are greater than those from coking coal, but the thermal response of heteroatom bonds in the former is almost twice that of the later. Moreover, vitrinite and inertinite of coking coal have N–H cleavage to produce active hydrogen in the late stage of bond dissociation, while gas coal lacks this feature. These explain why the pyrolytic properties of different coals and their macerals have variability, guiding the rational selection of coal-based feedstock for industry.