A three-dimensional (3-D), time-dependent, numerical magnetohydrodynamic (MHD) model is used to investigate the evolution and interaction of two coronal mass ejections (CMEs) in the nonhomogeneous ambient solar wind. The background solar wind is constructed on the basis of the self-consistent source surface with observed line of sight of magnetic field and density from the source surface of 2.5 Rs to Earth's orbit (215 Rs) and beyond. The two successive CMEs occurring on 28 March 2001 and forming a multiple magnetic cloud in interplanetary space are chosen as a test case, in which they are simulated by means of a two high-density, high-velocity, and high-temperature magnetized plasma blobs model, and are successively ejected into the nonhomogeneous background solar wind medium along different initial launch directions. The dynamical propagation and interaction of the two CMEs between 2.5 and 220 Rs are investigated. Our simulation results show that, although the two CMEs are separated by 10 h, the second CME is able to overtake the first one and cause compound interactions and an obvious acceleration of the shock. At the L1 point near Earth the two resultant magnetic clouds in our simulation are consistent with the observations by ACE. In this validation study we find that this 3-D MHD model, with the self-consistent source surface as the initial boundary condition and the magnetized plasma blob as the CME model, is able to reproduce and explain some of the general characters of the multiple magnetic clouds observed by satellite.