Answer:
The Chlorine atom has higher ionization energy.
Step-by-step explanation:
Ionization energy is the energy needed to separate an electron from an atom of an element in the gaseous state.
In the Periodic Table of Elements, Ionization energy increases from bottom to top (in a group), and increases from left to right (in a period).
In the folowing drawing we can see the variation of the Ionization energy and the location of the magnesium atom and chlorine atom:
Magnesium atom and Chlorine atom are located in the same period, but Mg is in group 2 (left side) and Cl in in group 17 (right side), so the Chlorine atom has higher ionization energy.