Arrays of multiwalled carbon nanotubes doped with phosphorus (P) and nitrogen (N) are synthesized using a solution of ferrocene, triphenyl-phosphine, and benzylamine in conjunction with spray pyrolysis. We demonstrate that iron phosphide (Fe(3)P) nanoparticles act as catalysts during nanotube growth, leading to the formation of novel PN-doped multiwalled carbon nanotubes. The samples were examined by high resolution electron microscopy and microanalysis techniques, and their chemical stability was explored by means of thermogravimetric analysis in the presence of oxygen. The PN-doped structures reveal important morphology and chemical changes when compared to N-doped nanotubes. These types of heterodoped nanotubes are predicted to offer many new opportunities in the fabrication of fast-response chemical sensors.