The present invention relates to a carbon nanotube that contains nitrogen based functional groups (such as nitro, nitroso, N-oxide, oxime, hydroxylamine, diazo, azo, and azide) that are covalently attached to lattice carbons of the carbon nanotube, directly or via a chemical linker. The present invention also relates to methods for the preparation of the carbon nanotube from an amino-functionalized carbon nanotube via an amino oxidation reaction. The synthetic methods of the present invention allow the nitrogen based functional groups to be attached selectively to one of two distinct regions of the carbon nanotube, the ends or the sidewall, and thus enable the synthesis of a carbon nanotube having nitrogen based functional groups substantially concentrated on either the ends or the sidewall of the carbon nanotube.