Nanostructured carbon materials have served as potent electrode materials and crucial components for energy storage; however, multi-function integration of the synthesis route is hugely challenging. Consequently, we report herein a facile and general methodology for the synthesis of multifunctional materials, specifically mesoporous onion-like carbon (OLC) and core-shell FeO@N-doped carbon hybrids, derived from water soluble gelatin and ferric nitrate precursors, which could function as high-performance electrodes for supercapacitors (SCs) and Li-ion batteries (LIBs). Owing to the strong chelation effect between the abundant functional groups of gelatin chains and metal ions, in situ-formed uniform confined nanoparticles (NPs) in a three-dimensional (3D) carbon framework could exert the triple roles of templates, graphitizing catalysts, and active materials via controllable annealing. Mesoporous OLC-3 with hollow core size of 5-8 nm, high specific surface area of 418 m g, thin shells of 3-5 graphitic layers, and rich oxygen content (18.62%) exhibited a remarkable specific capacitance (251.2 F g at 0.5 A g), surpassing most OLC state-of-the-art SC electrodes. Besides, the as-obtained core-shelled FeO@N-doped carbon annealed at 500 °C composed of a gelatin-derived carbon-coating layer (ca. 4 nm) and uniform FeO core (ca. 30 nm) greatly enhanced the rate capability (achieving an average reversible capacity of 735.9 mA h g at 0.1 A g and 480.6 mA h g at a large current density of 2 A g) and demonstrated an excellent cycling life (372 mA h g after 500 cycles at 1 A g, or 0.39 mA h g decay per cycle) for Li storage. This method is quite flexible and could be also extended to the synthesis of other metal-based functional materials.