Mesoporous carbon-silica precursors were synthesized by a sol-gel route. With different evaporation rates, the chemical precursors of silica and carbon would be formed homogenously in nanoscale or with carbon-rich spheres. When the homogenous mesoporous carbon-silica was heated at high temperature for a carbothermal reduction, SiC nanoparticles or SiC nanofibers were formed. When mesoporous carbon-silica nanocomposites with carbon-rich spheres were heated at high temperature, SiC hollow spheres formed with controllable thickness. When mesoporous carbon-silica was heated under nitrogen gas at high temperature, silicon nitride microribbons were obtained. All the results presented here indicate that mesoporous silica-carbon nanocomposites can be used to control materials synthesis by tailoring the chemistry compositions, pore shapes and pore sizes of their mesoporous precursors. It also reveals that mesoporous structures of carbon and metal oxides could be used to synthesize SiC, Si3N4 and other non-oxides with controlled morphology via carbothermal reduction or carbothermal reduction nitridation reaction.