The pioneers of physical metallurgy realized that in martensitic transformation and deformation twinning, a one-to-one lattice correspondence must exist between the parent and the product lattice. Thus, by analyzing the lattice correspondence, we can resolve the mechanisms for phase transformation and deformation twinning with clarity. The shape memory effect in NiTi alloy involves both martensitic transformation and mechanical twinning, and these processes must be reversible, which is necessary for shape memory effect. In this work, lattice transformation from ordered B2 austenite to monoclinic B19’ martensite, and lattice transformation for deformation twinning in B19’ martensite are analyzed, based on the results obtained from atomistic simulations. The results show that during martensitic transformation and twinning, only atomic shuffles are involved. These dislocation-free lattice transformations ensure both martensitic transformation and twinning are all reversible.