First-principles calculations are reported for a small Zn-Mg nanoalloy, to get insight into fundamental physicochemical properties that can be at the roots of the improved efficiency of Zn-Mg coatings against corrosion. We identify and rationalize composition-dependent features which modulate the noticeable charge transfer from Zn to Mg atoms. Local reactivity indicators demonstrate that Mg sites are, on average, the most reactive ones. Global reactivity indicators show that oxidation of the doped surface is a faster and more exothermic process as compared to a pure zinc surface.