The ground structure, elastic and electronic properties of several phases of NbN are determined based on ab initio total-energy calculations within the framework of density functional theory. Among the five crystallographic structures that have been investigated, the hexagonal phases have been found to be more stable than the cubic ones. The calculated equilibrium structural parameters are in good agreement with the available experimental results. The elastic constants of five structures in NbN are calculated, which are in consistent with the obtained theoretical and experimental data. The corresponding Debye temperature and elastic ansitropies are also obtained. The Debye temperature of NbN in various structures consistent with available experimental and theoretical data, in which the Debye temperature of δ-NbN is highest. The anisotropies of ZB-NbN, NaCl-NbN, CsCl-NbN gradually increases. For hexagonal structure, the anisotropies of ε-NbN are stronger than that of δ-NbN. The electronic structures of NbN under pressure are investigated. It is found that NbN have metallization and the hybridizations of atoms in NbN under pressure become stronger.