Molecular dynamics simulations in slab geometry and surface tension measurements were performed for aqueous solutions of magnesium acetate and magnesium nitrate at various concentrations. The simulations reveal a strong affinity of acetate anions for the surface, while nitrate exhibits only a very weak surface propensity, and magnesium is per se strongly repelled from the air/water interface. CH3COO- also exhibits a much stronger tendency than NO3- for ion pairing with Mg2+ in the bulk and particularly in the interfacial layer. The different interfacial behavior of the two anions is reflected in opposite concentration dependence (beyond 0.5 M) of surface tension of the corresponding magnesium salts. Measurements, supported by simulations, show that surface tension of Mg(NO3)2(aq) increases with concentration as for other inorganic salts. However, in the case of Mg(OAC)2(aq) the surface tension isotherm exhibits a turnover around 0.5 M, after which it starts to decrease, indicating a positive net solute excess in the interfacial layer at higher concentrations.