Three alkaline metal carbonates of MgCO 3 , CaCO 3 and BaCO 3 with different morphology, surface basicity and thermal stability were used as templates to find the template effect towards the morphology, oxygen species as well as supercapacitor performance of the derived nanocarbons. [Display omitted] • Three alkaline carbonates were adopted as catalytic templates for the fabrication of nanocarbons. • Residual oxygen and morphology of nanocarbons are greatly influenced by the nature of templates. • Residual oxygen in final products mainly exists in forms of redox-active carbonyl and hydroxyl. • The derived MgC displays superior surface area and supercapacitor performance. Nanocasting techniques are widely adopted for the fabrication of nanocarbons. However, there is little research on the effect of template nature on the physicochemical properties and performances of the nanocarbons. Herein, we investigated how the morphology, oxygen species as well as supercapacitor performance of the derived nanocarbons were governed by the morphology, surface basicity and thermal stability of MgCO 3 , CaCO 3 and BaCO 3 when the alkaline metal carbonates were used as templates. Using MgCO 3 as catalytic template, the MgC973 produced after carbonization at 973 K has ultrathin nanosheet morphology (∼20 nm), large specific surface area (952 m2/g), and superior supercapacitor performances, showing high capacitance of 421F/g@1.0 A/g (maintaining 306F/g@20 A/g), and large energy density of 31.1 Wh/kg@1000 W/kg. The superiority can be ascribed to the ultrathin morphology and thermal instability of the MgCO 3 template, which upon decomposition generates CO 2 and in situ activates the carbon skeleton. Moreover, the surface alkalinity of templates is conducive to the retention of electrochemically active oxygen, and BaC973 is with oxygen content (9.1 atom%) higher than MgC973 (7.9 atom%) and CaC973 (8.8 atom%). The present work provides insightful ideas for the synthesis of unique carbon materials with specific functionalities through the selection of suitable templates. [ABSTRACT FROM AUTHOR]