NbTiN thin films are good candidates for applications including single-photon detector, kinetic inductance detector, hot electron bolometer, and superconducting quantum computing circuits because of their favorable characteristics, such as good superconducting properties and easy fabrication. In this work, we systematically investigated the growth of high-quality NbTiN films with different thicknesses on Si substrates by reactive DC-magnetron sputtering method. After optimizing the growth conditions, such as the gas pressure, Ar/N2 mixture ratio, and sputtering power, we obtained films with excellent superconducting properties. A high superconducting transition temperature of 15.5 K with narrow transition width of 0.03 K was obtained in a film of 300 nm thickness with surface roughness of less than 0.2 nm. In an ultra-thin film of 5 nm thick, we still obtained a transition temperature of 7.6 K. In addition, rapid thermal annealing (RTA) in atmosphere of nitrogen or nitrogen and hydrogen mixture was studied to improve the film quality. The results showed that T
c and crystal size of the NbTiN films were remarkably increased by RTA. For ultrathin films, the annealing in N2/H2 mixture had better effect than that in pure N2. The T
c of 10 nm films improved from 9.6 K to 10.3 K after RTA in N2/H2 mixture at 450 °C.