Nitrogen doping of single and multi-walled carbon nanotubes is of great interest both fundamentally, to explore the effect of dopants on quasi-1D electrical conductors, and for applications such as field emission tips, lithium storage, composites and nanoelectronic devices. We present an extensive review of the current state of the art in nitrogen doping of carbon nanotubes, including synthesis techniques, and comparison with nitrogen doped carbon thin films and azofullerenes. Nitrogen doping significantly alters nanotube morphology, leading to compartmentalised 'bamboo' nanotube structures. We review spectroscopic studies of nitrogen dopants using techniques such as X-ray photoemission spectroscopy, electron energy loss spectroscopy and Raman studies, and associated theoretical models. We discuss the role of nanotube curvature and chirality (notably whether the nanotubes are metallic or semiconducting), and the effect of doping on nanotube surface chemistry. Finally we review the effect of nitrogen on the transport properties of carbon nanotubes, notably its ability to induce negative differential resistance in semiconducting tubes.