The structural and elastic properties of NbN2 at high pressures were investigated through the first-principles calculation. Results indicate that NbN2 is a potential hard material. NbN2 meets mechanical stability criteria and possesses ductility within the pressure of 100 GPa. The elastic anisotropy under high pressure was achieved by the elastic anisotropy factors, which reduce with increasing pressure. Using the quasi-harmonic Debye model, we also investigated the thermodynamic properties of NbN2.