► Pyrolysis of corncob was performed in a fixed-bed reactor under different conditions. ► The yield of 26.44% was obtained at a temperature of 500 °C, a heating rate of 40 °C/min and gas flow rate of 100 cm3/min. ► The oil is a mixture of aliphatic and aromatic hydrocarbons having an empirical formula of CH1.34O0.28N0.01. ► The higher calorific value of the oil is 26.22 MJ/kg, which is very close to those of petroleum fractions. ► FTIR analysis showed that the oil composition was dominated by oxygenated species.