Nickel-titanium shape memory alloy (NiTi-SMA) can restore its original shape after deformation, making it show great application in the fields of biomedicine, aerospace, etc. The wire electrical discharge machining (WEDM) has the advantage of machining micro and complex structures, which can greatly promote the application of NiTi-SMA. However, there are issues such as heat affected layer (HAL) on the surface of WEDM, which can affect the functionality of NiTi-SMA. Therefore, when using WEDM to NiTi-SMA, more attention should be paid to the functional changes after machining. This article primarily examine is the impact of peak current and pulse on time on the phase transformation behavior, shape memory effect, and mechanical properties of NiTi-SMA during WEDM, and introduces into the magnetic field assisted (MFA) process to improve the machining performance of NiTi-SMA. The results indicate that the HAL formed on the surface of NiTi-SMA is primarily composed of the irreversible phase transformation of B2 austenite. This layer induces a hardening effect, resulting in an increase in the phase transition temperature and a decrease in the phase transition energy (∆HM-A), as a result, the martensitic phase transformation behavior is suppressed. When the peak current and pulse on time increase, the surface quality of the NiTi-SMA processed decreases. The thickness of the HAL and microhardness increase, causing an increase in the phase transition temperature of the NiTi-SMA processed samples. Additionally, the transformation energy ∆HM-A, shape recovery rate, and mechanical properties decrease, and after recovery, more surface cracks appear and show larger extensions. MFA-WEDM can improve the surface quality of NiTi-SMA processing, reduce the thickness of the HAL, and effectively enhance the phase transformation temperature and energy ∆HM-A of the NiTi-SMA processed samples. With a magnetic field strength of 0.45 T, the tensile shape recovery rates of 98%, 94.4%, and 91.0% were achieved at 2%, 5%, and 8% strain, respectively. This represents an improvement of 8.9% compared to the maximum shape recovery rate with conventional WEDM. At the same time, it also inhibits the generation and propagation of surface cracks after deformation recovery. Additionally, MFA-WEDM improves the mechanical properties of NiTi-SMA, and reduces the thickness of the brittle fracture region by 49.7% compared to conventional WEDM. Therefore, MFA-WEDM can effectively enhance the shape memory effect of NiTi-SMA. However, it is important to avoid excessive peak currents and pulse on time to achieve optimal shape memory functionality.