Models for hydrolysis, fermentation and concentration process, production and utilization of biogas as well as lignin gasification are developed to calculate the heat demand of ethanol production process and the amounts of heat and power generated from residues and wastewater of the process. For the energy analysis, all relevant information about the process streams, physical properties, and mass and energy balances are considered. Energy integration is investigated for establishing a network of facilities for heat and power generation from wastewater and residues treatment aiming at the increase of energy efficiency. Feeding the lignin to an IGCC process, the electric efficiency is increased by 4.4% compared with combustion, which leads to an overall energy efficiency of 53.8%. A detailed sensitivity analysis on energy efficiency is also carried out.