The ion-beam-shaping mechanism is studied for several classes of nearly monodispersed metallic nanoparticles (Au, Ag, and Au 0.5Ag 0.5). They are in the range of 3-100 nm and embedded within a silica matrix. Experimentally, we show that depending on their initial sizes, several final morphologies can be obtained: (i) spherical shapes, (ii) facetted nanoparticles, (iii) nanorods, and (iv) nanowires. In parallel, the thermal-spike model was implemented for three-dimensional anisotropic and composite media to study the evolution of the temperature profile within a nanoparticle. This way, a clear correlation is found between the deformation path followed by the nanoparticles during the irradiation and the fraction of the nanoparticle that is molten (vaporized) due to the interaction with a swift heavy ion. This allows the construction of a size-vs-shape diagram relating the initial nanoparticle size to its final morphology. This diagram is used to give a rational description of the ion-beam-shaping process for all nanoparticle dimensions as a function of the irradiation parameters. © 2012 American Physical Society.