The electric power industry is the key to achieving the goals of carbon peak and neutrality. Accurate forecasting of carbon emissions in the electric power industry can aid in the prompt adjustment of power generation policies and the early achievement of carbon reduction targets. This study proposes a new approach that combines the decomposition-ensemble paradigm with knowledge distillation to forecast daily carbon emissions. First, seasonal and trend decomposition using locally weighted scatterplot smoothing (STL) is used to decompose the data into three subcomponents. Second, two heterogeneous deep neural network models are jointly trained to predict each subcomponent based on online knowledge distillation. During training, the two models learn and provide feedback to each other. The first model-ensemble stage is performed by synthesizing the predictions for each subcomponent of the two models. Finally, the second model-ensemble stage is performed. The predictions for each subcomponent are integrated using linear addition to obtain the final results. In addition, to avoid leakage of test data caused by decomposing the entire time series, a recursive forecasting strategy is applied. Multistep predictions are obtained by forecasting 7, 15, and 30 days in the future. Experimental results using metaheuristic algorithms to optimize hyperparameters show that the proposed method evaluated on the daily carbon emissions dataset has better forecasting performance than all baselines.