Coronal mass ejections (CMEs) are the most important drivers of various types of space weather disturbance. Here we report a newly developed magnetohydrodynamic (MHD) simulation of the solar wind, including a series of multiple CMEs with internal spheromak‐type magnetic fields. First, the polarity of the spheromak magnetic field is set as determined automatically according to the Hale‐Nicholson law and the chirality law of Bothmer and Schwenn. The MHD simulation is therefore capable of predicting the time profile of the southward interplanetary magnetic field at the Earth, in relation to the passage of a magnetic cloud within a CME. This profile is the most important parameter for space weather forecasts of magnetic storms. In order to evaluate the current ability of our simulation, we demonstrate a test case: the propagation and interaction process of multiple CMEs associated with the highly complex active region NOAA 10486 in October to November 2003, and present the result of a simulation of the solar wind parameters at the Earth during the 2003 Halloween storms. We succeeded in reproducing the arrival at the Earth's position of a large amount of southward magnetic flux, which is capable of causing an intense magnetic storm. We find that the observed complex time profile of the solar wind parameters at the Earth could be reasonably well understood by the interaction of a few specific CMEs.