The effect of BaO and Al2O3 on the viscosity of SiO2–CaO–MgO–Al2O3–BaO slag from 1673 to 1873 K is studied by the rotating cylinder method. The structure of slag is examined by Raman spectroscopy and molecular dynamics simulation. In this study of viscosity, Al2O3 shows amphoteric oxide characteristics and BaO shows characteristics different from the basic oxide. The viscosity increases as the BaO increases from 2 to 4 wt% in the slag with CaO/SiO2 = 1.07. However, the viscosity decreases when the BaO content increases from 6 to 8 wt%. From molecular dynamics simulations and Raman analysis, the increase in BaO content leads to a greater aggregation of Al around Ba atoms and increases the number of Al–O bonds. This indicates that higher BaO content promotes the polymerization of the [AlO4] tetrahedral structure. Furthermore, a good quantitative relationship between viscosity and the ratio of Q3/Q2 of the Raman spectrum of the slag is observed.