Deformation of a B19′ martensitic, polycrystalline Ni49.9Ti50.1 (at. %) shape memory alloy and its influence on the magnitude and stability of the ensuing two-way shape memory effect (TWSME) was investigated by combined ex situ mechanical experimentation and in situ neutron diffraction measurements at stress and temperature. The microstructural changes (texture, lattice strains, and phase fractions) during room-temperature deformation and subsequent thermal cycling were captured and compared to the bulk macroscopic response of the alloy. With increasing uniaxial strain, it was observed that B19′ martensite deformed by reorientation and detwinning with preferred selection of the (1¯50)M and (010)M variants, (201¯)B19′ deformation twinning, and dislocation activity. These mechanisms were indicated by changes in bulk texture from the neutron diffraction measurements. Partial reversibility of the reoriented variants and deformation twins was also captured upon load removal and thermal cycling, which after isothermal deformation to strains between 6% and 22% resulted in a strong TWSME. Consequently, TWSME functional parameters including TWSME strain, strain reduction, and transformation temperatures were characterized and it was found that prior martensite deformation to 14% strain provided the optimum condition for the TWSME, resulting in a stable two-way shape memory strain of 2.2%. Thus, isothermal deformation of martensite was found to be a quick and efficient method for creating a strong and stable TWSME in Ni49.9Ti50.1.