Abstract Phthalimide (PI) and tetrahydrophthalimide (THPI) are two structurally similar compounds extensively used as intermediates for the synthesis of variety of industrial chemicals. This paper investigates the thermal decomposition of PI and THPI under oxygen rich to oxygen lean conditions, quantifying the production of toxicants and explaining their formation pathways. The experiments involved a plug flow reactor followed by silica cartridges, activated charcoal trap and a condenser, with the decomposition products identified and quantified by Fourier transform infrared spectroscopy (FTIR), gas chromatography–mass spectrometry (GC–MS) and micro gas chromatography (μGC). The density functional theory (DFT) calculations served to obtain dissociation energies and reaction pathways, to elucidate the reaction mechanism. The oxidation of PI and THPI produced several toxic nitrogen-containing gases and volatile organic compounds, including hydrogen cyanide, isocyanic acid, nitrogen oxides, benzonitrile, maleimide and tentatively identified benzenemethanimine. The detection of dibenzo- p-dioxin (DD) and dibenzofuran (DF) suggests potential formation of the toxic persistent organic pollutants (POPs) in fires involving PI and THPI, in presence of a chlorine source. The oxidation of THPI produced 2-cyclohexen-1-one, a toxic unsaturated ketone. The results of the present study provide the data for quantitative risk assessments of emissions of toxicants in combustion processes involving PI and THPI.