When you talk about the ionization energy of $\ce{Mg^2+}$, it is the third ionization of $\ce{Mg}$, which is equal to $\pu{7734 kJ/mol}$. When you talk about the ionization energy of $\ce{Ne}$, it is the first ionization of $\ce{Ne}$, which is $\pu{2081 kJ/mol}$. Thus, actually, $IE_\ce{Mg^2+} \gt IE_\ce{Ne}$.
Keep in mind that the first and second ionization energies of $\ce{Mg}$ are equal to $\pu{738 kJ/mol}$ and $\pu{1451 kJ/mol}$, respectively, both of which are smaller than the first ionization of $\ce{Ne}$ ($\pu{2081 kJ/mol}$).
Simplified reason: Both $\ce{Mg^2+}$ ion and $\ce{Ne}$ atom have the electronic configuration ($\mathrm{1s^22s^22p^6}$). Yet, $\ce{Mg^2+}$ has extra two protons in its nucleus than that of $\ce{Ne}$, thus attraction forces on electrons in $\ce{Mg^2+}$ are higher than that of $\ce{Ne}$ (e.g., $F_{q_+q_-} = \dfrac{1}{4 \pi \epsilon_\circ} \cdot \dfrac{q_+q_-}{d^2}$; also keep in mind that $r_\ce{Mg^2+} \lt r_\ce{Ne}$). By that reason alone, one can assume that the ionization energy of $\ce{Mg^2+}$ is higher than that of $\ce{Ne}$.
Note that your statement of "$\ce{Ne}$ has the greatest ionization energy" is incorrect. In that concept, the first ionization of $\ce{He}$ ($\pu{2372 kJ/mol}$) is greater than that of $\ce{Ne}$ ($\pu{2081 kJ/mol}$).