Abstract:IPyrolysis of tar-rich coal is a crucial pathway for its clean and efficient utilization. However, the depositional environment controls the source and preservation of organic matter, thereby influencing the molecular structure and pyrolysis behavior of these coals. The mechanism linking depositional environment to pyrolysis products remains poorly understood. In this study, tar-rich coals from the Taiyuan and Yan’an formations on the western margin of the Ordos Basin were investigated using coal petrology, coal quality analysis, FTIR, TG, and GC-MS to clarify the environmental controls on pyrolysis behavior and tar composition. The results show that tar-rich coals from different depositional settings exhibit distinct coal-facies and pyrolysis potentials. Specifically, N2 deposited in a floodplain Marsh facies exhibits the highest H/C ratio and tar yield. In contrast, N1 and N3, formed in delta-plain and lagoon-tidal-flat settings, show lower tar yields. This variation in tar yield is primarily controlled by molecular structure. N2 contains more methylene-rich aliphatic structures (-CH2-), resulting in lower pyrolysis peak temperatures (432.39-436.87 °C) and higher maximum weight-loss rates (0.58-0.96 %·min-1), which indicate enhanced pyrolytic reactivity. Variations in vegetation input and organic matter preservation further affect tar composition. Tar from N2 is enriched in aliphatic hydrocarbons and phenolic compounds, whereas tar from N1 and N3 contains higher proportions of aromatic hydrocarbons. Consequently, a comprehensive framework is proposed that links the peat-forming environment, molecular structure, pyrolysis behavior, and tar composition. These findings demonstrate that the depositional environment governs pyrolysis performance by regulating the molecular structure of coal, providing a scientific basis for the targeted utilization of tar-rich coals of different origins.