The viscosity of silicate liquids at high temperature is crucial to our understanding of chemical and thermal evolution of the Earth since its early stages. First-principles molecular dynamics simulations of seven liquids across the MgO-SiO2 binary show that the viscosity varies by several orders of magnitudes with temperature and composition. Our results follow a compensation law: on heating, the viscosity of all compositions approaches a uniform value at 5000 K, above which pure silica becomes the least viscous liquid. Viscosity depends strongly on composition (fourth power), implying a strong nonlinear dependence of the configurational entropy on composition. Using the simulation results, we derive and evaluate different types (Arrhenius and non-Arrhenius) of models for accurate description of the viscosity-temperature-composition relationship. Our results span the thermal regime expected in a magma ocean, and indicate that melt migration is important for understanding the generation and preservation of melts from frictional heating at very fast slip in impact processes.