Nitrogen concentrations and isotopic compositions were measured by ion microprobe scanning imaging in two interplanetary dust particles L2021 K1 and L2036 E22, in which imaging of D/H and C/H ratios has previously evidenced the presence of D-rich macromolecular organic components. High nitrogen concentrations of 10-20 wt% and δ 15N values up to +400‰ are observed in these D-rich macromolecular components. The previous study of D/H and C/H ratios has revealed three different D-rich macromolecular phases. The one previously ascribed to macromolecular organic matter akin the insoluble organic matter (IOM) from carbonaceous chondrites is enriched in nitrogen by one order of magnitude compared to the carbonaceous chondrite IOM, although its isotopic composition is still similar to what is known from Renazzo (δ 15N = +208‰). The correlation observed in macromolecular organic material between the D- and 15N-excesses suggests that the latter originate probably from chemical reactions typical of the cold interstellar medium. These interstellar materials preserved to some extent in IDPs are therefore macromolecular organic components with various aliphaticity and aromaticity. They are heavily N-heterosubstituted as shown by their high nitrogen concentrations >10 wt%. They have high D/H ratios >10 -3 and δ 15N values ≥ +400‰. In L2021 K1 a mixture is observed at the micron scale between interstellar and chondritic-like organic phases. This indicates that some IDPs contain organic materials processed at various heliocentric distances in a turbulent nebula. Comparison with observation in comets suggests that these molecules may be cometary macromolecules. A correlation is observed between the D/H ratios and δ 15N values of macromolecular organic matter from IDPs, meteorites, the Earth and of major nebular reservoirs. This suggests that most macromolecular organic matter in the inner solar system was probably issued from interstellar precursors and further processed in the protosolar nebula.