The electronic properties of carbon nanotubes (CNTs) can be tuned by substitutional doping with heteroatoms (mainly B and N) to expand the applications of CNTs. Based on the comprehensive understanding of the substitutional doping of CNTs, it should be possible to deliberately design doped CNTs for specific purposes. Thus, relevant experimental and theoretical works are reviewed herein in an attempt to correlate the synthetic methods, electronic properties, and applications of heteroatom-doped CNTs. The distribution and arrangement of heteroatoms in the graphitic lattice of CNTs can be modulated through the choice of synthetic conditions, which would further lead to different electronic properties of CNTs for their chemical applications.