We propose an electrically inactive nitrogen complex in oxynitrides through first-principles pseudopotential calculations. This complex consisting of two N atoms at O sites and an O vacancy removes the electrical activity of O vacancies, without bonding with hydrogen, and thus improves the electrical properties of oxynitrides. The stability of the N complex is greatly enhanced as going from the bulk to interface region. We also suggest that charge traps involving a single N atom, such as a bridging N center, are deactivated by reactions with O or NO interstitials.