Understanding and possibly recovering from the failure mechanisms of phase change memories (PCMs) are critical to improving their cycle life. Extensive electrical testing and postfailure electron microscopy analysis have shown that stuck–set failure can be recovered. Here, self-healing of novel confined PCM devices is directly shown by controlling the electromigration of the phase change material at the nanoscale. In contrast to the current mushroom PCM, the confined PCM has a metallic surfactant layer, which enables effective Joule heating to control the phase change material even in the presence of a large void. In situ transmission electron microscope movies show that the voltage polarity controls the direction of electromigration of the phase change material, which can be used to fill nanoscale voids that form during programing. Surprisingly, a single voltage pulse can induce dramatic migration of antimony (Sb) due to high current density in the PCM device. Based on the finding, self-healing of a large void inside a confined PCM device with a metallic liner is demonstrated for the first time.