Ionisation energy of magnesium is more than that aluminum?
Magnesium has stable electronic configuration as compared to aluminum .Now see configuration of mg outermost shell = (Ne)3s2 it has full filled orbital configuration that give extra stability to mg.
Al =(Ne)3p1 it has incompletely filled orbital configuration ..
And iionisation ppotential will be more for stable element (here mg),more energy will be required by e- to come out from stable outermost shell .