Silver nanoparticle assemblies are embedded within mesoporous oxide thin films by an in situ mild reduction leading to nanoparticle–mesoporous oxide thin-film composites (NP@MOTF). A quantitative method based on X-ray reflectivity is developed and validated with energy dispersive spectroscopy in order to assess pore filling. The use of dilute formaldehyde solutions leads to control over the formation of silver nanoparticles within mesoporous titania films. Inclusion of silver nanoparticles in mesoporous silica requires more drastic conditions. This difference in reactivity can be exploited to selectively synthesize nanoparticles in a predetermined layer of a multilayered mesoporous stack leading to complex 1D-ordered multilayers with precise spatial location of nanometric objects. The metal oxide nanocomposites synthesized have potential applications in catalysis, optical devices, surface-enhanced Raman scattering, and metal enhancement fluorescence.