Inspired by the preparation of the hierarchically-porous carbon (HPC) derived from metal organic frameworks (MOFs) for energy storage, in this work, a simple iron-based metal- organic complex (MOC), which was simpler and cheaper compared with the MOF, was selected to achieve versatile energy storage. The intertwined 1 D nanospindles and enriched-oxygen doping of the HPC was obtained after one-step carbonization of the MOC. When employed in lithium-ion batteries, the HPC exhibited reversible capacity of 778 mA h g(-1) after 60 cycles at 50 mA g(-1) . Moreover, the HPC maintained a capacity of 188 mA h g(-1) after 400 cycles at 100 mA g(-1) as the anode material in a sodium-ion battery. In addition, the HPC served as the cathode matrix for evaluation of a lithium-sulfur battery. The general preparation process of the HPC is commercial, which is responsible for the large-scale production for its practical application.