The invention discloses a stainless steel material with a shape memory function and a preparation method thereof. The stainless steel material comprises, by mass, 0.09-0.12% of carbon, 4.36-5.23% of nickel, 3.86-5.20% of chromium, 12.46-13.33% of manganese, 2.51-3.01% of silicon, 1.47-1.89% of niobium, 4.23-4.87% of titanium, 0.20-0.40% of yttrium, not more than 0.035% of the total amount of phosphorus and sulphur, and the balance iron and inevitable impurities. According to the stainless steel material with the shape memory function and the preparation method thereof, the problems that a stainless steel traction frame of a traditional skull retractor is too high in yield strength and low in bending property and recovery rate are mainly solved, by using and improving existing Fe-Mn-Si memory alloy, the low-cost stainless steel material with the shape memory function is obtained, the yield strength of the stainless steel material is not higher than 375 N/mm<2>, the toughness of the stainless steel material reaches 8.5 J/cm<2>, the shape recovery rate of the stainless steel material reaches 97.4%, and existing defects are overcome.