A novel hierarchical nanostructure with graphite-like carbon and small Si nanocrystals, respectively, encapsulated in the mesopores and embedded in a silica framework of mesoporous silica nanoparticles is constructed for high-performance Li-ion batteries.