Scattering of low-energy positrons from Mg atoms is considered using many-body theory methods. For the first time the contribution of the Ps-formation channel is taken into account in addition to the polarization potential of the atom. At low energies the virtual Ps formation creates a strong attraction in the positron–atom channel, which produces positron–atom bound states in the s and p waves (0.985 and 0.159 eV are the corresponding binding energies), and a low-lying d-wave resonance at 1 eV. At higher energies this contribution gives rise to an effective positron–atom repulsion. On the whole, the inclusion of the Ps-formation contribution drastically changes the behaviour of the phase shifts and the shape of the partial-wave cross sections below 20 eV. Total and inelastic positron–Mg cross sections have been calculated. It appears that the present theory can explain the very recent results of the first experiment on positron–Mg scattering.