Al has the higher first ionisation energy. Mg electronic configuration is [Ne]3s2 whereas Al configuration is [Ne]3s23p1. To remove the electron from Al, it has to be removed from the 3p orbital, as oppose to the 3s orbital in Mg. The 3p orbital is further away from the nucleus than the 3s orbital therefore would need more energy to remove it, making Al have a higher ionisation energy than Mg.