A versatile and highly tunable synthesis for nanofiber aerogels based on the n-type organic semiconductor perylene tetracarboxylic diimide (PTCDI) is presented. PTCDI nanofiber aerogels are demonstrated to incorporate the organic semiconductor into a high surface area and porous morphology, and can also be graphitized to synthesize carbon nanofiber (CNF) aerogels by thermal annealing. Using this approach, CNF aerogels with variable density and crystallinity are synthesized. Furthermore, by incorporating metal salts into the synthesis, metal-directed assembly yields a variety of nanoscale morphologies. The selection of post-synthesis thermal treatment can result in metal-directed assembly of PTCDI aerogels, low crystallinity graphitic aerogels decorated with metal nanoparticles, or highly crystalline graphitic aerogels with controllable nanoscale morphologies. The high surface area and porosity afforded by the aerogel morphology coupled with the intrinsic properties of PTCDI or CNFs is important for improving their performance in a number of applications including energy storage and catalysis.