The effect of magnesium hydride on the corrosion behavior of pure magnesium in 0.1 M NaCl solution was investigated using the gas collection method, potentiostatic current decay test, and in situ Raman spectrum. The formation of magnesium hydride (Mg H 2 , Mg 2 H 4 ) was observed at the cathodic region. Applying anodic potential leads to decomposition of magnesium hydride. Magnesium hydride plays an important role on the negative difference effect (NDE) in both the cathodic and anodic regions.