Based on the cellular automaton (CA) method, a numerical model was developed to simulate the dendritic growth of magnesium alloy with HCP crystal structure. The growth kinetics was calculated from the complete solution of the transport equations. By defining a special neighborhood configuration with the square CA cell, and using a set of capturing rules which were proposed by BELTRAN-SANCHEZ and STEFANESCU for the dendritic growth of cubic crystal metals during solidification, modeling of dendritic growth of magnesium alloy with different growth orientations was achieved. Simulation of equiaxed dendritic growth and columnar dendritic growth under directional solidification was carried out, and validation was performed by comparing the simulated results with the experimental results and those in the previously published works.