Shape-memory alloys (SMA) have interesting behaviors and important mechanical properties due to the solid-solid phase transformation. These phenomena are dominated by the evolution of microstructures. In recent years, the microstructures in SMAs have been studied extensively and modeled using molecular dynamics (MD) simulations. However, it remains difficult to identify the crystal variants in the simulation results, which consist of large numbers of atoms. In the present work, a method is developed to identify the austenite phase and the monoclinic martensite crystal variants in MD results. The transformation matrix of each lattice is calculated to determine the corresponding crystal variant. Evolution of the volume fraction of the crystal variants and the microstructure in Ni-Ti SMAs under thermal and mechanical boundary conditions are examined. The method is validated by comparing MD-simulated interface normals with theoretical solutions. In addition, the results show that, in certain cases, the interatomic potential used in the current study leads to inconsistent monoclinic lattices compared with crystallographic theory. Thus, a specific modification is applied and the applicability of the potential is discussed.