In this study, porous electrospun carbon fibers were prepared by electrospinning with PAN and MgCl2, as a MgO precursor. MgO was selected as a substrate because of its chemical and thermal stability, no reaction with carbon, and ease of removal after carbonization by dissolving out in acidic solutions. MgCl2 was mixed with polyacrylonitrile (PAN) solution as a precursor of MgO with various weight ratios of MgCl2/PAN. The average diameter of porous electrospun carbon fibers increased from 1.3 to 3 μm, as the MgCl2 to PAN weight ratio increased. During the stabilization step, MgCl2 was hydrolyzed to MgOHCl by heat treatment. At elevated temperature of 823 K for carbonization step, MgOHCl was decomposed to MgO. Specific surface area and pore structure of prepared electrospun carbon fibers were decided by weight ratio of MgCl2/PAN. The amount of hydrogen storage increased with increase of specific surface area and micropore volume of prepared electrospun carbon fibers.