The liquid Mg-Bi system exhibits strong compound formation at the 'octet' composition (Mg 3 Bi 2 ). We present results of first-principles molecular dynamics simulations of this alloy system at different compositions: the pure Mg and Bi liquid components, the stoichiometric liquid, and a Mg-rich composition (Mg 62 Bi 28 ). For the pure liquids, our results are in excellent agreement with experimental diffraction data. For Mg 3 Bi 2 , a significant modification of the characteristics of the local ordering is found w.r.t. the crystalline α-phase: the ordering in the liquid is much more ionic. This structural modification is consistent with the structure of the superionic β-phase, that was reported recently by Barnes et al 1994 J. Phys.: Condens. Matter 6 L467. Our simulations cannot reproduce the 'reverse' metal-nonmetal transition observed upon melting, the computed conductivity being much larger than found in experiments. Instead, for the Mg-rich Mg 62 Bi 28 alloy, the calculated conductivity approaches closely to the experimental value.