The incorporation of nitrogen atoms into carbon nanotube (CNT) walls occurs mainly via bonding with three or two carbon atoms, and the obtained configurations are referred to as graphitic and pyridinic nitrogen forms. Here, we evaluate the energy of formation of these nitrogen defects in an armchair (6,6) CNT and the static polarizability of the obtained nitrogen-containing carbon () nanotubes using a dispersion-corrected hybrid functional. The calculations showed that the graphitic nitrogen atoms prefer to be in the pentagonal rings located at a nanotube cap. The nanotubes with such nitrogen impurities have enhanced polarizability as compared to their nondoped counterparts. The formation of the pyridinic nitrogen defect requires ; however, if the CNT already contains a vacancy, this energy reduces to . The presence of pyridinic nitrogen atoms in nanotubes should not increase the polarization response. Our results suggest that the electromagnetic properties of nanotubes can be tuned by interconverting between graphitic and pyridinic nitrogen forms.