Coffee is a global consumer product whose energy is waste. In order to reuse coffee grounds, the n-heptane was used to extract the coffee oil from spent coffee grounds. Then the coffee oil and methanol were used to prepare biodiesel through transesterification. In addition, the coffee grounds after extraction of oil was used to make solid biofuels. By experiments, the effects of different extraction methods, different proportions of n-heptane and coffee grounds, number of repeated uses of n-heptane and moisture content of raw materials on extraction rate of coffee oil and recovery of n-heptane were determined. Composition of obtained biodiesel was analysed by gas chromatography-mass spectrometer. It was found that there were many components in biodiesel, including many esters, unreacted fatty acids, and some cyclic and linear organic compounds. By thermogravimetric analysis of defatted grounds, apparent activation energies of the combustion of main volatiles, secondary volatiles and fixed carbon were determined using the Coats-Redfern method. The apparent activation energies were 96.801 kJ·mol-1, 30.973 kJ·mol-1 and 21.227 kJ·mol-1, respectively.