Shape memory (SM) ceramics, such as yttria-stabilized tetragonal zirconia (YSTZ), are a unique family of SM materials that offer unique properties including ultra-high operating temperature, and high resistance to chemical corrosion and oxidation. However, formation of defects is usually observed in SM ceramics during manufacturing and/or by mechanical deformation. To fully take advantage of the SM properties of these ceramics, it is necessary to fully understand the nanostructural evolution of defects under external stimuli. In this study, defect closure behaviors in YSTZ nanopillars are investigated by atomistic simulations. Two characteristic orientations of 011 and [001] are selected to represent the dominant deformation mechanisms of phase transformation and dislocation migration, respectively. With the presence of crack and void, the strength and yield strain of nanopillars are noted to decrease significantly, especially for 011oriented YSTZ nanopillars. Volume expansion associated with the tetragonal to monoclinic phase transformation is observed to promote healing of crack and void. Atom stress analyses reveal stress concentrations along the newly formed monoclinic phase bands. A critical crack width is identified, less than which the crack can be fully closed in compression. Size effect study reveals that an increase in nanopillar size has a positive effect on crack self-healing behavior. For [001]-oriented YSTZ nanopillars, dislocation migration leads to formations of an amorphous phase, which also assist the crack and void closure process. The revealed crack/void healing mechanisms may provide a path for mitigating internal defects that influences the mechanical properties and deformation mechanisms of SM ceramics.