Mesostructured silica thin films and particles prepared by surfactant-templated sol–gel techniques are highly versatile substrates for the formation of functional materials. The ability to deliberately place molecules possessing desired activities in specific spatially separated regions of the nanostructure is an important feature of these materials. Such placement utilizes strategies that exploit the physical and chemical differences between the silica framework and the templated pores. As an example of placement of pairs of molecules, donor and acceptor molecules can be targeted to different regions of mesostructured thin films and energy transfer between them can be measured. The results not only demonstrate the spatial separation but also are used as a molecular ruler to measure the average distance between them. Mesostructured silica is also an excellent support for molecular machines. Molecules that undergo large amplitude motion, when attached to the silica, can function as impellers and nanovalves when activated by light, electrical (redox) and chemical (pH, competitive binding) energy. Derivatized azobenzene molecules, attached to pore walls by using one of the placement strategies, function as impellers that can move other molecules through the pores. Rotaxanes and pseudorotaxanes, placed at pore entrances, function as gatekeepers that can trap and release molecules from the pores when stimulated. Deliberately placed functional molecules on and in mesostructured silica offer many possibilities for both fundamental studies on the nanoscale and for applications in fields as diverse as fluidics, biological drug delivery and controlled release.