Thermophiles hydrolysis and acidogens fermentation were sequentially adopted to pretreat excess sludge for microbial fuel cell (MFC) electricity production. The results indicated that MFC fed with the thermophiles-acidogens pretreated sludge (MFC AB), reached a higher removal of ammonia nitrogen than the MFC fed with the heating hydrolysis and acidogens fermentation pretreated sludge (MFC NB). However, compared with the MFC AB, MFC NB presented a better performance for removal of soluble chemical oxygen demand (SCOD) (90.08%) and protein (82.42%). As for the electricity production, MFC NB obtained higher voltage of 0.632 V and maximum power density with 1.05 W/m3 while MFC AB reached maximum voltage of 0.373 V and maximum power density of 0.58 W/m3. Bacterial 16S rRNA-based molecular microbial techniques showed that microbial communities on both MFC anode biofilms was diverse and different. The cooperation of fermentation bacteria and electricigen Shewanella baltica in the MFC NB may have contributed towards the improvement of electricity generation.