Basic oxygen furnaces (BOFs) are widely used to produce steel from hot metal. The process typically has limited automation which leads to sub-optimal operation. Economically optimal operation can be potentially achieved by using a dynamic optimization framework to provide operators the best combination of input trajectories. In this paper, a first-principles based dynamic model for the BOF that can be used within the dynamic optimization routine is described. The model extends a previous work by incorporating a model for slag formation and energy balances. In this new version of the mathematical model, the submodel for the decarburization in the emulsion zone is also modified to account for recent findings, and an algebraic equation for the calculation of the calcium oxide saturation in slag is developed. The dynamic model is then used to simulate the operation of two distinct furnaces. It was found that the prediction accuracy of the developed model is significantly superior to its predecessor and the number of process variables that it is able to predict is also higher.