Absolute cross sections for the K-shell photoionization of Be-like and Li-like atomic nitrogen ions were measured by employing the ion–photon merged-beam technique at the SOLEIL synchrotron radiation facility in Saint-Aubin, France. High-resolution spectroscopy at nominal resolutions of 38, 56, 111, 133 meV full width at half maximum (FWHM) for Be-like and 125 meV FWHM for Li-like atomic nitrogen ions was achieved for the photon energies ranging from 410 up to 460 eV. The experimental measurements are compared with theoretical estimates from the multi-configuration Dirac–Fock, R-matrix and an empirical method. The interplay between experiment and theory enabled the identification and characterization of the strong 1s → 2p resonances features observed in the K-shell spectra of each ion and the region around 460 eV for the 1s → 3p resonance of the N3 + ion yielding suitable agreement with experiment.