Organic carbon (C) and oxygen (O) contained in sewage sludge strongly impact its thermal behavior during pyrolysis treatment. This study was aimed at getting an insight into the decomposition mechanism of organic compounds containing C and O during sludge pyrolysis using thermo-gravimetric Fourier transform infrared spectroscopy (TG-FTIR) and pyrolysis-gas-chromatography/mass spectrometry (Py-GC/MS) and helpfully improving energy conversion of sewage sludge. The temperature domains of transformation were determined and indications of the main compounds produced during each stage were obtained. Results showed that the volatile compounds that evolved after sludge pyrolysis were mainly distributed into six groups: alkenes, aromatic hydrocarbons, alcohols, aldehydes, phenols and carboxylic acids. Comparison in thermal behavior and composition of the evolved volatile compounds were observed. In the low temperature stage (<350 °C), compounds containing O–C=O accounted for the highest proportion in the evolved gas (55%). Over 350 °C, the production of C=C, –OH, and –C6H5 compounds gradually increased; but little was found of compounds containing O–C=O. Above 550 °C, as thermal chemical reaction involving oxygen-containing groups enhanced, compounds containing O–C=O and –OH tended to disappear, and an increasing amount of macromolecular polycyclic aromatic hydrocarbon was formed. Finally, the thermal transformation pathways of the oxygen and carbon-containing compounds were proposed.