Carbon and nitrogen species on the surface of carbon nanotubes (N-CNTs) and nanofibers (N-CNFs) were studied by X-ray absorption (XAS) and photoelectron spectroscopy (PES) including the analysis of nitrogen distribution over the depth of materials. The study was performed with a series of bamboo-like carbon nanotubes and nanofibers having the platelet-like and herringbone-like morphology. It was shown that the main nitrogen species in the composition of the studied materials are pyridine, pyrrole (and/or amino groups), graphite-like and oxidized states of nitrogen. In distinction to nanofibers, the bamboo-like nanotubes additionally contain molecular nitrogen encapsulated in the internal hollows. Spectral data for different depths of analysis were obtained by varying the energy of incident radiation. Such an approach revealed that N-CNTs are characterized by non-uniform distribution of chemically bound nitrogen species. Thus, nitrogen enrichment was observed on the external surface and in the internal arches of carbon nanotubes. Nitrogen enrichment in the subsurface region was found for N-CNFs, whereas the full depth analysis of N-distribution was limited by a large diameter of nanofibers.