We present a detailed theoretical study of the electronic, magnetic, and structural properties of magnesiowüstite Fe 1−x Mg x O with x in the range between 0 and 0.875 using a fully charge self-consistent implementation of the density functional theory plus dynamical mean-field theory method. In particular, we compute the electronic structure and phase stability of the rocksalt B1-structured (Fe,Mg)O at high pressures relevant for the Earth's lower mantle. We find that upon compression paramagnetic (Fe,Mg)O exhibits a spin-state transition of Fe
2+ions from a high-spin to low-spin (HS-LS) state which is accompanied by a collapse of local magnetic moments. The HS-LS transition results in a substantial drop in the lattice volume by about 4%-8%, implying a complex interplay between electronic and lattice degrees of freedom. Our results reveal a strong sensitivity of the calculated transition pressure P tr. upon addition of Mg. While, for Fe-rich magnesiowüstite with Mg x < 0.5, P tr. is about 80 GPa, for Mg x = 0.75 it drops to 52 GPa, i.e., by 35%. This behavior is accompanied by a substantial change in the spin transition range from 50 to 140 GPa in FeO to 30 to 90 GPa for x = 0.75. In addition, the calculated bulk modulus (in the HS state) is found to increase by ∼12% from 142 GPa in FeO to 159 GPa in (Fe,Mg)O with Mg x = 0.875. We find that the pressure-induced HS-LS transition has different consequences for the electronic properties of the Fe-rich and -poor (Fe,Mg)O. For the Fe-rich (Fe,Mg)O, the transition is found to be accompanied by a Mott insulator to a (semi)metal phase transition. In contrast to that, for x > 0.25, (Fe,Mg)O remains insulating up to the highest studied pressures, implying a Mott-insulator to band-insulator phase transition at the HS-LS transformation.