Accurate accounting and prediction of carbon emissions from sewage treatment plants is the basis for exploring low-carbon sewage treatment plants and measures to reduce pollution and carbon emissions. Although carbon emission prediction models have been widely used in construction, transportation and other fields, research in the field of wastewater treatment is still lacking, and the existing research is mostly limited to the prediction of carbon emissions from a single link or energy consumption, which makes it difficult to control the carbon emissions of the whole plant as a whole in order to realize the carbon emission reduction of the whole plant. This study proposes a hybrid prediction framework based on machine learning and deep learning, which integrates multiple algorithms and has strong adaptability and generalization ability. The pre-framework uses Pearson correlation coefficient to select feature values, constructs a combined prediction model based on the selected features using support vector machine (SVR) and artificial neural network (ANN), and optimizes the model parameters and structure using Gray Wolf Optimization (GWO) algorithm. The results show that the model has stronger prediction performance compared with other prediction models, with a mean absolute percentage error (MAPE) of 0.49% and an R2 of 0.9926. In addition, this study establishes six future development scenarios based on the historical data trends and policy outlines, which provide recommendations for the development of carbon emission reduction measures for wastewater treatment plants. This study can provide a reference for exploring efficient carbon management and achieving carbon neutrality in wastewater treatment plants.