Both Magnesium Oxide and Sodium Chloride exist as a giant ionic lattices where each oppositely charged ion is held in place by a strong electrostatic attractions. These ionic bonds are strong and require a large amount of thermal energy to overcome them and break the structure, enabling it to change state from a solid into a liquid. The ionic bonding in Sodium Chloride is between Na+ and Cl- ions whereas the ionic bonding in Magnesium Oxide is between Mg2+ and O2- ions. As the charge in the ionic lattice in Magnesium Oxide is two times as large, the ionic bonding is stronger so more energy is required to overcome the electrostatic attraction and break down the ionic lattice.