The production of stainless steel begins by melting of scrap in melt shop that is known as one of the most electricity intensive processes. Volatile and uncertain renewable energy sources cause high fluctuations in electricity prices and thus usually higher costs for the final user such as a melt shop. This paper presents an integrated production and electricity optimization system that can help the melt shop to adjust its production schedule to volatile electricity prices and thus lower its costs. An existing production scheduling optimization system based on a continuous-time mixed-integer linear programming model has been further developed to account for electricity costs as well. It deploys an intelligent heuristics which decomposes the overall optimization problem into several sub-problems of smaller size in order to achieve faster and more robust solution. The electricity-aware optimization system has been successfully tested and implemented in a melt shop where it managed to reduce electricity costs by around 3%. At the same time, the system has improved coordination between different production stages, and thus made the entire melt shop more flexible, agile and responsive to unexpected events. The system has also been recognized as a very useful tool for running various simulations, what-if analysis and business scenarios on the melt shop in order to identify bottlenecks and further increase its production rate.