In this work, Qiqunahu (QQH) coal, cotton stalk, cellulose and lignin extracted from cotton stalk were selected as raw materials to study the effects of the co-pyrolysis of coal and cotton stalk. Online thermogravimetric mass spectrometry (TG-MS) was used to analyse mass loss and gas release characteristics during co-pyrolysis. The results reveal that the mixture of cotton stalk and coal can significantly enhance the reactivity of the blends and promote the formation of effective gas. The cellulose in the cotton stalk promotes the generation of H2 and CO2 during the co-pyrolysis of coal and cotton stalks. Lignin promotes the production of CH4 and CO2. Cellulose and lignin show an inhibitory effect on the precipitation of small molecular weight hydrocarbon gases during co-pyrolysis. This study provides a better understanding for the co-pyrolysis of biomass and coal.