Recovering chemical energy from wastewater is an important route to reduce the electricity input in wastewater treatment plants (WWTPs), which can significantly decrease the carbon footprint of wastewater treatment. Existing evaluation models of energy self-sufficiency focused on macroscopic substance-energy flow and considered the overall energy balance of WWTPs but ignored the substance and energy conversion process via microbial metabolism. In this study, a net-zero energy (NZE) model was established based on microbial metabolism and energy balance to estimate the potential for chemical-energy recovery from wastewater pollutants and the optimization of metabolic substrate allocation, which was implemented in a large WWTP with anaerobic digestion. The results indicate that temperature and ΔCOD were key influence factors for specific energy consumption μ. The average energy self-sufficiency rate was 43.9% under the existing operations in the WWTP. The energy self-sufficiency rates with optimized substrate allocation ranged from 58.3% to 110.6%, with an average value of 78.8%. The energy self-sufficiency rates obtained in July and August were higher than 100%, indicating that the WWTP could achieve NZE status and output electric energy in July and August, but not in other months. Seasonal variation significantly affected the potential of chemical energy recovery from wastewater pollutants in the WWTP. The average reduction in greenhouse gas emissions with energy recovery under optimal operation conditions reached 76.4% in the WWTP studied herein. The enhanced anaerobic digestion efficiency and optimization of substrate allocation between catabolism and anabolism could increase the possibility of achieving NZE status based on the model.