The pure rotational transitions of HN 2 + and DN 2 + in the first excited vibrational states for all the fundamental vibrational modes have been observed in the range of 300–750 GHz. The molecular constants determined are much more accurate compared with those obtained from the infrared spectroscopy. The equilibrium rotational constants, B e = 46832.45 (71) MHz for HN 2 + and B e = 38708.38 (58) MHz for DN 2 +, have been determined by correcting for the higher-order vibration–rotation interaction effects, γ ij , obtained by an infrared investigation. The equilibrium bond lengths are derived from these equilibrium rotational constants: r e (H–N) = 1.03460 (14) Å and r e (N–N) = 1.092698 (26) Å.