A first principle study was performed to discuss the high temperature oxidation mechanism of NiTi alloys with the special emphasis on the effect of Nb on the oxidation behavior. The calculation results suggest that the Nb atom prefers the Ti site in Ni(Ti,Nb). The addition of Nb will not only reduces the electron density of Ti-d and Ni-d states near the Fermi energy level but the their electron contributions to the p-orbital of Ti. In addition, the Nb atom increases the formation energy of the Ti defect, which will decrease the diffusion of Ti atoms. All these Nb-induced effects account for the improvement of high temperature oxidation resistance, which agrees well with the experimental results.