Dual ion-beam sputtering has been used to achieve the growth of silver and iron nanoclusters embedded within graphite-like carbon and boron nitride thin films. Encapsulation of the nanoclusters in carbon nanocages has been realized when the deposition was performed at 500 °C whereas a temperature of 200 °C was sufficient to form hexagonal BN layers surrounding the nanoclusters. We show that, thanks to the enhanced surface diffusion of the deposited species, self-organized arrays of nanoclusters elongated along the growth direction can be produced by argon-assisted co-deposition of the metal and the matrix material. Vertical ordering of the nanoclusters, which develops from a topology-induced self-organization, can also be obtained by alternate deposition of very thin metallic layers separated by BN layers, as shown by high-resolution transmission electron microscopy and grazing incidence small-angle X-ray scattering.