Stress-induced martensitic detwinning and martensitic transformation during step-wise compression in an austenite Ni–Mn–Ga matrix with a martensite cluster under uniaxial loading have been investigated by electron backscatter diffraction, focusing on the crystallographic features of microstructure evolution. The results indicate that detwinning occurs on twins with a high Schmid factor for both intra-plate and inter-plate twins in the hierarchical structure, resulting in a nonmodulated (NM) martensite composed only of favourable variants with [001]NM orientation away from the compression axis. Moreover, the stress-induced martensitic transformation occurs at higher stress levels, undergoing a three-stage transformation from austenite to a twin variant pair and finally to a single variant with increasing compressive stress, and theoretical calculation shows that the corresponding crystallographic configuration is accommodated to the compression stress. The present research not only provides a comprehensive understanding of martensitic variant detwinning and martensitic transformation under compression stress, but also offers important guidelines for the mechanical training process of martensite.