Using a first-principles approach, we study the incorporation of nitrogen at the Si(001)-SiO2 interface by calculating N Is core-level shifts for several relaxed interface models. The unusually large shift with oxide thickness of the principal peak in photoemission spectra is explained in terms of a single first-neighbor configuration in which the N atom Is always bonded to three Si atoms, both in the interfacial region and further in the oxide. Core-hole relaxation and second nearest neighbor effects concur in yielding larger binding energies in the oxide than at the interface. The calculations do not support the occurrence of N-O bonds at nitrided Si(001)-SiO2 interfaces.