We have analyzed the stability of transition metal nitrides (TMNs) XN (X = Ti, Zr, Hf, V, Nb, Ta) in their original rocksalt (B1) and hypothetical CsCl (B2) type phases under high compression. The ground state total energy calculation approach of the system has been used through the generalized gradient approximation (GGA) with the Perdew-Burke-Ernzerhof (PBE) type parameterization as exchange correlation functional. In the whole series of nitrides taken into consideration, tantalum nitride is found to be the most stable. We have observed that under compression the original B1-type phase of these nitrides transforms to a B2-type phase. We have also discussed the computation of ground state properties, like the lattice constant (a), bulk modulus (B0) and first order pressure derivative of the bulk modulus (B'0) of the TMNs and their host elements.