The most precise to-date evaluation of the nuclear recoil effect on the n = 1 and n = 2 energy levels of He-like ions is presented in the range Z = 12–100. The one-electron recoil contribution is calculated within the framework of the rigorous quantum electrodynamics approach to first order in the electron-to-nucleus mass ratio m/M and to all orders in the parameter αZ. The two-electron m/M recoil term is calculated employing the 1/Z perturbation theory. The recoil contribution of the zeroth order in 1/Z is evaluated to all orders in αZ, while the 1/Z term is calculated using the Breit approximation. The recoil corrections of the second and higher orders in 1/Z are taken into account within the nonrelativistic approach. The obtained results are compared with the previous evaluation of this effect (Artemyev et al 2005 Phys. Rev. A 71 062104).