Coffee grounds were deemed unsuitable for thermophilic anaerobic digestion due to problems of instability. In this research, a 25 day batch experiment and a 185 day long term experiment using a 12 liter continuously stirred tank reactor (CSTR) were carried out to identify the inhibitory factors and to evaluate the energy production. In the batch experiment, a methane yield of 285 mL per g-COD was obtained. Grinding coffee grounds into small particles could not increase the biogas yield but accelerated the biogas production rate. When continuously operating the CSTR digester, the pH dropped to 6.8, volatile fatty acid (VFA) accumulated to 4000 mg L-1 and biogas production sharply decreased after 50 days. Subsequent pH adjustment and trace metal supplementation recovered the digester. However, biogas decline reoccurred on the 80th day. By increasing sludge content to 15% TS in the mixture substrate, the digester was successfully recovered. From the 96th day, the digester entered a steady state lasting for 90 days. The pH was maintained by supplying NH4HCO3 at 3.0 g-N per kg-TS. Propionate content was around 2.0 g L-1 and dominated the total VFA. At a hydraulic retention time (HRT) of 30 days and an organic loading rate (OLR) of 7.54 kg-COD per m3 per day, the COD removal efficiency reached 52.8%. Per kilogram, the substrate generated 0.279 Nm3-CH4 which contained 10 MJ energy; the daily energy production per cubic meter of the digester was 42.9 MJ per m3 per day.