Aluminium has a lower first ionisation energy than magnesium. This is because it's outer electron is in a p-orbital in comparision to magnesium's outer electron which is in an s-orbital. The outer electron of Aluminum is therefore higher in energy and so less energy is required to remove it