We present a strategy for stabilizing the morphological integrity of electrospun polymeric nanofibers by heat stimuli in situ crosslinking. Amorphous polymer nanofibers, such as polystyrene (PS) and its co-polymers tend to lose their fiber morphology during processing at temperatures above their glass transition temperature (T g ) typically bound to happen in nanocomposite/structural composite applications. As an answer to this problem, incorporation of the crosslinking agents, phthalic anhydride (PA) and tributylamine (TBA), into the electrospinning polymer solution functionalized by glycidylmethacrylate (GMA) copolymerization, namely P(St-co-GMA), is demonstrated. Despite the presence of the crosslinker molecules, the electrospinning polymer solution is stable and its viscosity remains unaffected below 60 8C. Crosslinking reaction stands-by and can be thermally stimulated during post-processing of the electrospun P(St-co-GMA)/PA-TBA fiber mat at intermediate temperatures (below the T g ). This strategy enables the preservation of the nanofiber morphology during subsequent high temperature processing. The crosslinking event leads to an increase in T g of the base polymer by 30 8C depending on degree of crosslinking. Crosslinked nanofibers are able to maintain their nanofibrous morphology above the T g and upon exposure to organic solvents. In situ crosslinking in epoxy matrix is also reported as an example of high temperature demanding application/processing. Finally, a self-same fibrous nanocomposite is demonstrated by dual electrospinning of P(St-co-GMA) and stabilized P(St-co-GMA)/PA-TBA, forming an intermingled nanofibrous mat, followed by a heating cycle. The product is a composite of crosslinked P(St-co-GMA)/PA-TBA fibers fused by P(St-co-GMA) matrix. V C 2016 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2016, 133, 44090.