The behavior of substitutional N impurities in chemical vapor deposited diamond is examined theoretically in order to explain recent channeling experiments indicating a dominant onsite incorporation of N. The calculations are based on a combination of density-functional methods at various levels of approximation applied to supercell and cluster models. Neutral charge N impurities in the presence of highly defective carbon regions, such as dangling bonds, strained bonds, and partially developed π bonds are studied. We find a perfectly general argument concerning the position of the substitutional N atom in relation to the position of the Fermi level, Ef : if Ef lies above the A1 level associated with the onsite substitutional N atom, off-site motion in the 〈111〉 direction is observed. Conversely, when Ef falls below A1, N doping charge is transferred to the available deeper lying states. Suitable receptor states include surface dangling bonds, surface reconstruction π bonds, and bulk defects states such as grain boundaries and vacancies.