NiTi alloy has excellent advantages in elastocaloric cooling due to its fatigue-resistant high performance and superelasticity. The piezoelectric material Pb(Zr0.52Ti0.48)O3 (PZT) is used in actuators and sensors for its piezoelectric or inverse piezoelectric effect. In this research, the NiTi thin film was coated with PZT to form a Ni49Ti51/PZT heterojunction by magnetron sputtering. The elastocaloric effect of the NiTi film was regulated by the electric field. The inverse piezoelectric effect of PZT was used to trigger the elastocaloric effect of the NiTi film in Ni49Ti51/PZT. This inverse piezoelectric–elastocaloric coupling involved electrical, mechanical, and thermal energy transformations, providing avenues for the development of an elastocaloric effect in refrigeration.