Polyimides (PIs) possess excellent mechanical properties, thermal stability, and chemical resistance and can be converted to carbon materials by thermal carbonization. The preparation of carbon nanomaterials by carbonizing PI-based nanomaterials, however, has been less studied. In this work, the fabrication of PI nanofibers is investigated using electrospinning and their transformation to carbon nanofibers. Poly(amic acid) carboxylate salts (PAASs) solutions are first electrospun to form PAAS nanofibers. After the imidization and carbonization processes, PI and carbon nanofibers can then be obtained, respectively. The Raman spectra reveal that the carbon nanofibers are partially graphitized by the carbonization process. The diameters of the PI nanofibers are observed to be smaller than those of the PAAS nanofibers because of the formation of the more densely packed structures after the imidization processes; the diameters of the carbon nanofibers remain similar to those of the PI nanofibers after the carbonization process. The thermal dissipation behaviors of the PI and carbon nanofibers are also examined. The infrared images indicate that the transfer rates of thermal energy for the carbon nanofibers are higher than those for the PI nanofibers, due to the better thermal conductivity of carbon caused by the covalent sp2 bonding between carbon atoms.