A three-dimensional model was developed to investigate the formation of embedded nanoparticles by ion beam implantation. The dynamical nucleation and growth process, including well-known Ostwald ripening, were successfully reconstructed by a theoretical model. Considering various Gaussian distribution profiles of implanted ions for different conditions, the effects of implanted ion mass, fluence, ion flux and temperature on the morphology of nanostructures were also revealed. According to the numerical calculations, no precipitates or particles formed in the early stage of implantation due to the low ion fluence and insufficient time for ion diffusion. With increasing ion fluence, immiscible impurity atoms started to segregate as dispersed nanoparticles. For a very high ion fluence, the implantation-induced nanostructure with a buried layer of implanted atoms developed. These simulation results were fully consistent with many experimental observations. This theoretical model gives a remarkable insight into the formation mechanism, and makes it possible to totally control and optimize the nanostructure through ion-implantation technology.