During electrolysis, a current is passed through the molten MgCl2, and when this happens, the Mg2+ ions move to the negative electrode where they PICK UP OR GAIN ELECTRONS. This is reduction. The Cl- ions move to the positive electrode where they LOSE ELECTRONS. This is oxidation.