Carbon-supported single-atom catalysts (SACs) have shown great potential in electrocatalysis, whereas traditional synthesis methods typically involve energy-intensive carbonization processes and unfavorable atomic migration and aggregation. Herein, an energy-efficient and universal strategy is developed to rapidly fabricate various SACs on nitrogen-doped hierarchically porous carbon nanofibers (M-TM/NPCNFs, TM = Fe, Co, Ni, FeCo, and FeNi) by electrospinning and controllable microwave heating technique. Such microwave heating technique enables an ultrafast heating rate (ramping to 900 °C in 5 min) to greatly suppress the random migration and aggregation of metal species. Meanwhile, the energy consumption and time can be reduced to 2.5% and less than half an hour, respectively, compared to traditional pyrolysis methods. As a proof of concept, the synthesized M-Fe/NPCNFs with abundant Fe-N