A system combined an upflow anaerobic fixed bed (UAFB) and an expanded granular sludge bed (EGSB) was designed and verified as a success for treating real sewage with simultaneous energy recovery and autotrophic nitrogen removal. The impact of temperature (stepwise decreased from 30°C to 20°C and 10°C) was a primary focus, aiming to reveal the response of the anaerobic digestion (AD) and anammox efficiency to the temperature variation. As the temperature decreases, the soluble chemical oxygen demand (sCOD) removal rate was 90.6%, 90.0% and 84.7%, respectively; total nitrogen (TN) removal was 69.4%, 48.8%, 38.4%, respectively; NH4+-N removal was 91.3%, 74.9%, 65.1%, respectively. Methanogenic activity of UAFB was significantly influenced by low temperatures, while the unavoidable growth of heterotrophic organisms in EGSB also contributed to the sCOD removal, even at 10°C. Lower working temperature (10/20°C) limited the growth and activity of ammonia-oxidizing bacteria (AOB) and anaerobic ammonia oxidation bacteria (AnAOB), but improved the nitrite-oxidizing bacteria (NOB) activity.