A versatile strategy has been developed to prepare various hierarchical carbon based nanocomposites through combining several synthetic methods, such as hydrothermal method, templating technique etc. Through the method, core-shell, sandwich structured carbon nanocomposites can be facilely prepared. The present approach permits a satisfactory tailoring of architectural features of the nanocomposites and can realize convenient and low-cost manufacture of various carbon based composites. It is envisaged that the availability of the hierarchical carbon based nanocomposites would show extensive potential applications in catalysis, fuel cell and other device systems.