The development of carbon materials as highly efficient and durable substrates for surface-enhanced Raman scattering (SERS) is of great importance for realizing practical application of molecular sensing through Raman spectroscopy. In this report, we demonstrate the fabrication, by low-temperature pyrolysis, of high-quality, iron-nitrogen-doped carbon nanosheets and nanorods from spin-coated poly(4-vinylpyridine) (P4VP) polymer thin films and electrospun polymer nanofibers, respectively. As P4VP chains have functional pyridine rings available to bind with metal precursor ions through favorable interactions, iron (Fe) atoms can be incorporated into the carbon nanostructures with the aid of Fe(II) acetate during the synthesis. The incorporation of a metal salt can decrease the thermal stability of pyridinic groups so that the pyrolysis produces carbon nanostructures with high degree of graphitization and with iron- and nitrogen-doped species. The codopants in these carbon nanostructures introduce surface dipole moments, affect the DOS of valence bands, and decrease the work function. The electronic structure of carbon nanomaterials can be finely tuned to enable the vibronic coupling of the conduction band and valence band states of carbon nanostructures with the excited and ground states of the probed molecules of Rhodamine 6G and crystal violet. The vibronic coupling enables a superior enhancement in SERS with the detection limit concentration being as low as 10-7 M and the maximum enhancement factor being 3.8 × 104 through a charge transfer (CT) process. The polymer-templated carbon nanostructures offer great promise for the implementation of this system in a next-generation SERS substrate for molecular sensing.