The grain size of solidification microstructure has a significant influence on the mechanical properties of castings. Generally, smaller grain size makes the strength of castings higher. Therefore, inoculation is an effective strategy to reduce grain size and improve casting performance. In this work, the phase-field method combined with the free growth model is employed to simulate the solidification of inoculated aluminum alloy with temperature gradient. The simulations indicate that a higher temperature gradient slows the progression of already nucleated grains into impingement growth and enhances the undercooling of the melt ahead of the solid-liquid interface. Hence, more inoculants have chance to get the corresponding nucleation undercooling, promoting grain nucleated sequentially along the gradient direction. These results are consistent with previous real-time observed experiments. This work may provide guidance on improvement of the theoretical models for predicting grain size of inoculated alloys and the optimization of casting process to obtain refined grains in inoculated ingots.