The content of C and P elements in EAF steelmaking molten steel directly affects steel quality. The main task of EAF steelmaking is to provide qualified molten steel for the refining process. The real-time composition prediction of molten steel in the smelting process will be helpful for EAF charging and other process operations. To solve this problem, based on the actual production data of a 150 ton EAF in a steel plant, this paper constructs a real-time prediction model of molten steel composition in EAF steelmaking with the help of the development tool Visual Studio 2022. The model can predict the content of C and P elements in molten steel in real-time, which can guide the addition of auxiliary materials and other process operations in the smelting process. The average deviation of endpoint C is less than or equal to 0.05%, and the average deviation of endpoint P is less than or equal to 0.007%.