In the research project, we aim to fabricate hierarchical porous carbon (HPC) nanostructures with heteroatom-rich functional groups for molecular sensing through surface-enhanced Raman scattering (SERS) spectroscopy. Unique architectures of HPC nano-structures based on pyrolysis of porous polymer thin films provide a new design strategy for fabricating SERS substrates. First, hierarchical porous polymer films with engineered morphology will be fabricated by controls over the phase separation between solvent and homopolymer, or by block copolymer nanodomains with structural diversity (such as sphere, cylinder, lamella or continuous network phase) and tunable dimensions (zero-, one-, two- and three-dimension) though self-assembly and self-ordering. The resultant porous films will be cross-linked and pyrolyzed to form HPC nanostructures. Next for HPC nanostructures, we aim to establish correlations between geometric structures (such as porous morphology, size/size distribution, porosity, surface area, the degree of graphitization and spatial order of nanostructures), chemical compositions (hetero-atom configuration and component), and electron structures as well as energy levels (conduction band, valence band, Fermi level and work function). To gain the structural, chemical and electronic information will help us clearly realize the chemical mechanism of charge transfer and the SERS performance based on evaluation of Raman enhancement factor for absorbed dye molecules on the HPC nanostructures.