A three-dimensional (3-D) cellular automaton (CA) model for simulating the dendrite morphology of cast Mg alloys has been developed. In the model a technique based on two sets of mesh is utilized to perform the simulation to reproduce the texture of Mg dendrites. The CA calculation is performed using a set of mesh that is defined by the hexagonal close-packed (HCP) crystal lattice, and other computations are carried out by using a cubic mesh. The two sets of mesh are coupled by using interpolation method. The kinetics of the solid-liquid interface is obtained directly by the difference between local equilibrium composition and local actual composition given by the solute transport equation. The model was used to simulate 3-D columnar growth of sixteen grains and 3-D equiaxed growth of a single dendrite of AZ91D alloy. Permanent mold castings of AZ91D alloy were produced and sampled for optical metallographic examinations, and the simulated results were compared with the metallographic results.