In the production process of steel enterprise, reasonable scheduling of byproduct energy plays a significant role in reducing operation cost, environmental pollution and improving energy utilization. In this study, a two-stage optimal scheduling method is proposed to solve the problem. The optimal scheduling of coupled gas-steam-electricity system and production scheduling of steelmaking-refining-continuous casting are introduced into this method. The minimum energy purchase cost and carbon emission cost are considered as the objective functions in the optimal scheduling of coupled gas-steam-electricity system. Through the proper adjustment of production plan, the distribution structure of energy is optimized and the space for energy optimization is expanded, which is more profitable to reduce the operation cost of enterprise. The proposed method has been validated with actual operation data of a large domestic steel enterprise, the optimization results show that the total cost of the enterprise can be reduced by 20.75% compared to the actual operating cost of the enterprise and 1.52% compared to the general optimization method, providing support for conducting steel enterprises to save energy and reduce emission, as well as reduce cost and increase efficiency.