A nitrogen atom has 5 electrons in its outermost shell. A nitrogen atom achieved octet of valence electrons by sharing 3 pairs of electrons with another atom.
Thus, when nitrogen fills it's valence shell it achieve octet and become inert, that is, unreactive.