Ni50.3Ti29.7Hf20 is an alloy with shape memory characteristics that can withstand high temperatures. It possesses remarkable strength, hardness, and exceptional corrosion resistance. SMAs are well-suited for various applications, including automotive sensors, automobiles, aerospace technologies, robotics, actuators, and MEMS devices. However, its unique properties make it difficult to machine using conventional methods. Wire EDM is an unconventional machining process suited for difficult-to-machine materials like Ni-Ti-Hf alloy, providing high accuracy and precision and minimizing the risk of material damage. This paper focuses on the optimization of machining parameters, namely Discharge time (P-ON), Pause time (P-OFF), Gap voltage (GV), and Wire travel speed (WS) during WEDM of Ni-Ti-Hf shape memory alloy utilizing the TOPSIS and GWO techniques. The aim is to obtain optimal machining parameters for improving the machined Ni-Ti-Hf alloy's material removal rate (MRR) and surface roughness (R-a). The optimal machining parameters from GWO were P-ON = 123.8 mu s, P-OFF = 50 mu s, WS = 2, and GV = 25. The predicted values of material removal rate and surface roughness are 4.22 mm(3)/min and 3.62 mu m, respectively. The experimental verification demonstrates the proposed optimization approach's effectiveness, as the predicted values correlate strongly with the actual values.