By formulating the martensite transformation start temperature (Ms) of NiTi shape memory alloys (SMAs) as a function of Ni concentration, a Ni-concentration dependent phase field model is newly proposed in this work. Then, based on correspondent phase field simulations, the elastocaloric effects (eCEs) of the NiTi SMA samples with different Ni-concentration gradients and various aspect ratios are investigated and discussed. The simulated results show that the martensite transformation start stress of NiTi SMAs in the sample with a Ni-concentration gradient along the tensile direction progressively increases during the tensile loading, leading to a step-by-step martensite transformation; hence the suppression of microscopic instability results in a small stress-strain hysteresis loop in the process of tensile-unloading and a tremendous improvement in the coefficient of performance of material (COPmat) if addressing the eCE of the sample. When the aspect ratio of the sample is relatively small (e.g., 1:1), the microscopic instability can be suppressed due to the strong boundary constraint, indicating that reducing the aspect ratio is an efficient way to obtain a small stress-strain hysteresis loop and improve the COPmat of NiTi SMA samples. Moreover, for the sample with a Ni-concentration gradient, when its aspect ratio is relatively large, its eCE is mainly determined by the Ni-concentration gradient; while, when the aspect ratio becomes relatively small, the eCE of the sample is strongly dependent on both the Ni-concentration gradient and the aspect ratio. It implies that the NiTi SMA sample with both a small Ni-concentration gradient and a small aspect ratio and that with both a large Ni-concentration gradient and a large aspect ratio demonstrate the optimal eCE. In other words, a pioneering approach, i.e., concentration-gradient engineering, can be put forward to enhance the eCE of NiTi SMAs based on the detailed phase field simulations. The new findings in this work provide available guidance for improving the eCE of NiTi SMAs and open a novel way for developing advanced SMA-based elastocaloric materials.