Greenhouse gas (GHG) emission and energy consumption by on-site and off-site sources were estimated in two different wastewater treatment plants that used physical–chemical or biological processes for the removal of contaminants, and an anaerobic digester for sludge treatment. Physical–chemical treatment processes were used in the treatment plant of a locomotive repair factory that processed wastewater at 842 kg chemical oxygen demand per day. Approximately 80% of the total GHG emission was related to fossil fuel consumption for energy production. The emission of GHG was reduced by 14.5% with the recovery of biogas that was generated in the anaerobic digester and its further use as an energy source, replacing fossil fuels. The examined biological treatment system used three alternative process designs for the treatment of effluents from pulp and paper mills that processed wastewater at 2,000 kg biochemical oxygen demand per day. The three designs used aerobic, anaerobic, or hybrid aerobic/anaerobic biological processes for the removal of carbonaceous contaminants, and nitrification/denitrification processes for nitrogen removal. Without the recovery and use of biogas, the aerobic, anaerobic, and hybrid treatment systems generated 3,346, 6,554 and 7,056 kg CO2-equivalent/day, respectively, while the generated GHG was reduced to 3,152, 6,051, and 6,541 kg CO2-equivalent/day with biogas recovery. The recovery and use of biogas was shown to satisfy and exceed the energy needs of the three examined treatment plants. The reduction of operating temperature of the anaerobic digester and anaerobic reactor by 10°C reduced energy demands of the treatment plants by 35.1, 70.6 and 62.9% in the three examined treatment systems, respectively.