When current is passed through molten sodium chloride, Na+ ions get reduced at the negative electrode (cathode) and thus sodium is deposited at cathode whereas Cl− ions get oxidized at the positive electrode (anode) and hence chlorine gas is formed at anode.