NiTi shape memory alloy is widely used as biomaterial for its superior mechanical properties and good biocompatibility. Effective protocols based on the surface oxidation mechanisms, which would precisely control the formation of surface oxide, should be designed and implemented to improve the biocompatibility of NiTi alloy based biomaterials. To shed light on the TiOx species formation mechanism on NiTi surface, density functional theory (DFT) based calculations were carried out to study the adsorption and reactions of O2 on the NiTi alloy (100) surface. O2 is found activated and will decompose upon adsorption. At higher O2 coverage, the reconstructed bridge configuration will generate (110) surface of TiO2, and the hollow configuration will evolve to (100) surface of TiO. The formation of TiO2 phase is thermodynamically favored, but only feasible when the temperature is enough high. At lower temperature, the atomic diffusion is slowed down, and the surface reconstruction will be limited. This explains why TiO2 will be dominant TiOx at higher temperature, and TiO will exist at lower temperature. Our current work provides more insights on the initial oxidation of NiTi surface, and these findings would be beneficial to improve NiTi alloy based biomaterials, and might guide the design of new functional materials.