The dispersion of carbon nanotubes (CNTs) in AZ91D melt by ultrasonic processing and microstructure formation of CNTs/AZ91D composite were studied using numerical and physical simulations. The sound field and acoustic streaming were predicted using finite element method. Meanwhile, optimal immersion depth of the ultrasonic probe and suitable ultrasonic power were obtained. Single-bubble model was used to predict ultrasonic cavitation in AZ91D melt. The relationship between sound pressure amplitude and ultrasonic cavitation was established. Physical simulations of acoustic streaming and ultrasonic cavitation agreed well with the numerical simulations. It was confirmed that the dispersion of carbon nanotubes was remarkably improved by ultrasonic processing. Microstructure formation of CNTs/AZ91D composite was numerically simulated using cellular automation method. In addition, grain refinement was achieved and the growth of dendrites was changed due to the uniform dispersion of CNTs.