In this study, NbN thin films were deposited by reactive magnetron sputtering at different N2 partial pressures and at room temperature. X-Ray diffraction analysis, transmission electron microscopy and atomic force microscopy were employed to characterize their phases, microstructure and surface morphology. Their microhardness and elastic modulus were evaluated using a microhardness tester and the effects of N2 partial pressure on the phase formation, microstructure and mechanical properties of NbN thin films were investigated. The results show that there are clear effects of N2 partial pressure on the deposition rate, phases, hardness and elastic modulus of magnetron sputtered NbN films. At a low N2 partial pressure, the deposition rate is higher, while hcp β-Nb2N and fcc δ-NbN coexist in NbN films. With the increase of N2 pressure, the deposition rate decreases and the films are single-phase fcc δNbN; accordingly, the hardness and modulus reach peak values of 36.6 GPa and 457 GPa, respectively. A further increase of the N2 partial pressure will cause hcp ε-NbN to appear in NbN films and then the hardness and modulus of films decrease.