Coupling with electrospinning technique, metal–organic‐frameworks (MOFs)‐derived porous carbon fibers exhibit a great potential application in the adsorption of volatile organic compounds (VOCs) because of their huge surface area, high porosity, as well as sufficient heteroatom‐doped active sites. In this work, the hierarchically porous N‐doped carbon nanofibers are obtained after the pyrolysis of zeolite imidazole framework‐8 and polyacrylonitrile (ZIF‐8/PAN) composite fibers synthesized by electrospinning method. The N‐doped carbon nanofibers fabricated in N2 atmosphere (N‐CF‐N2) present an enhanced adsorption capacity of 694 mg/g for benzene because of the synergistic effect of the hierarchically porous structure and the abundant N‐species‐containing active sites. It is also interesting that the N‐doped hierarchical carbon nanofibers fabricated in Ar atmosphere (N‐CF‐Ar) exhibit a low benzene adsorption as compared with the N‐CF‐N2, which can be attributed to the porous structure damage caused by the bombardment of heavy Ar atoms on the pore shells during the pyrolysis. These results not only show a promising application of the as‐fabricated N‐CF‐N2 in adsorption of VOCs for air purification due to its merit of cost‐efficient, large‐scale production, and excellent adsorption capacity, but also expand the potential of electrospinning technology and composite fibers in volatile organic gas adsorption.