In this work, a method to study the formation of syngas during the underground coal gasification (UCG) process and its reactive transport in the surrounding strata is proposed. It combines a thermodynamic equilibrium stoichiometric model of the cavity reactions with a coupled thermo-hydraulic-chemical-mechanical (THCM) framework of COMPASS code for the transport of UCG products away from the cavity. With the input information of coal properties obtained from the South Wales coalfield, gasification reagents (air and steam) and thermodynamic conditions (initial temperature and pressure), the thermodynamic equilibrium model developed provides the maximum yield of gasification products and temperature from a UCG system. Gasification results giving the syngas composition with the highest percentage of methane and carbon dioxide, are then used as the chemical (gas) and thermal boundary conditions for the coupled thermo-chemical model of the THCM framework to analyse the variations of temperature and gas concentrations, in strata surrounding the UCG reactor. For that purpose, a set of numerical simulations considering three porous media (coal, shale and sandstone) with different physico-chemical properties is conducted. The gasification results demonstrate that increasing the amount of steam injected in the UCG reactor decreases the temperature of the system as well as the concentration of carbon monoxide and nitrogen, while benefiting the production of hydrogen, methane and carbon dioxide. The numerical simulations performed using the THCM model indicate that multicomponent gas diffusion and advection are competing transport mechanisms in porous media with intrinsic permeability higher than 1 mD (sandstone), while the gas diffusion becomes a dominant transport process in porous media with an intrinsic permeability lower than 1 mD (coal and shale). Moreover, the simulation results of reactive transport of methane and carbon dioxide in different porous media demonstrate the significance of considering the adsorption effect in the gas transport in the overall UCG process. In particular, the retardation of the gas front due to gas sorption is the most pronounced in coal, followed by shale and then sandstone. In conclusion, the model presented in this study demonstrates its potential application in managing the environmental practices, reducing pollution risk and securing greater public and regulatory support for UCG technology.