Sodium Chloride has a crystalline structure in which the positive and negative ions are held by very strong electrostatic forces of attraction. Hence there are no free electrons to move because of which it is an insulator. However molten NaCl is in liquid state in which the ions are free to move. Therefore in molten state, the charge is carried by the ions and hence NaCl conducts electricity in molten state.