We demonstrate that confinement of a concentrated triconstituent precursor solution (a soluble phenolformaldehyde prepolymer, tetraethylorthosilicate, and the nonionic triblock copolymer F127) in a poly(methyl methacrylate) (PMMA) colloidal crystal template permits control over the external morphology of mesostructured products. It is possible to produce either monoliths with hierarchical porosity (ordered macropores from PMMA spheres and large mesopores from F127) or cubic and spherical mesoporous nanoparticles. The specific morphology depends on the concentration of F127 and on the presence of 1,3,5-trimethyl benzene (TMB) as an additive. At lower F127 content and without TMB, macroporous monoliths of the carbon/silica composite are obtained, which can be converted to carbon monoliths with dual porosity after the extraction of silica with hydrofluoric acid or to silica monoliths after calcination in air. Large worm-like mesopores are present in macropore walls. An increase in the F127 concentration leads to disassembly of the macroporous skeleton during pyrolysis, and produces a bimodal mixture of uniformly sized cubic nanoparticles (ca. 120 nm edge lengths) and smaller spherical nanoparticles (ca. 55 nm diameters) (MSP-1). These nanoparticies are derived from the octahedral and tetrahedral holes in the colloidal crystal template through the solid-state disassembly of the inorganic skeleton. The addition of TMB changes the mechanism of nanoparticle formation. In this case, solvent-induced phase separation between the polymer template and the inorganic precursors occurs below 100°C, which results in spherical nanoparticles (MSP-2), whose product diameters depend more critically on sample composition. Both MSP-1 and MSP-2 nanoparticles are mesoporous, but their textural properties vary significantly with type and composition. The MSP-1 particles keep their cubic shapes even after being heated at 1000°C in an inert atmosphere.