To investigate the effective utilization of agricultural and forestry wastes for mitigating the shortage of primary energy and environmental pollution, the pyrolysis behavior of corn straw (CS), wheat straw (WS), and poplar sawdust (PS) was studied using thermogravimetric–Fourier transform infrared (TG‐FTIR) analysis. The activation energies and pyrolysis mechanism functions of different biomass types were calculated. The results showed that the functional group structures of the gaseous products generated from the pyrolysis of different biomass types were similar, mainly including OH, aliphatic CH, CO, aromatic ring skeleton, aromatic CH, and CO groups. These functional group structures mainly existed in oxygen‐containing compounds such as phenols, ketones, aldehydes, acids, esters, alcohols, and ethers. The pyrolysis process of agricultural and forestry wastes exhibited certain differences, with the PS undergoing thermal decomposition more easily, while the thermal decomposition mechanism functions of the two agricultural wastes (CS and WS) were similar. PS had a later initial release time for volatile matter, and the oxygen compounds produced by its pyrolysis were the highest, followed by WS and CS.