The energy balance of a municipal wastewater treatment (WWT) system was evaluated considering the influence of excess biological sludge anaerobic biodegradability (BDAn) and of biogas utilisation as either fuel for co-generation of heat and power (CHP) or for vehicle transport. Sludge thermal pre-treatment prior to anaerobic digestion and high-rate carbon removal were considered as modifications of a reference municipal WWT system to impact the sludge BDAn. Both thermal pre-treatment and a high-rate process with a short sludge retention time (SRT=1–3d) led to ∼30% higher sludge BDAn than that of untreated sludge from a low-rate WWT system with long SRT (>8d), which enhanced methane yields and energy production correspondingly. An efficient separation (40% of CODin) of primary solids promoted biogas production by capturing a significant part of the incoming COD, and lowered aeration energy demands for carbon oxidation due to lower loads of particulate organics into the biological treatment. Thermal pre-treatment can most effectively increase the biodegradability of sludge originating from a low-rate WWT system with a long SRT. Sludge solubilization alone as an indicator of increase biodegradability by a pre-treatment is inadequate for sludge types with inherently high biodegradability. A WWT system with primary separation, sludge pre-treatment, and CHP from biogas can be a net electricity producer and self-sufficient in thermal energy, provided the thermal energy from CHP is available for the pre-treatment. With other types of energy carriers as inputs and outputs, the WWT performance also needs evaluation with respect to the energy economic and environmental value.