Most of hexagonal close-packed (HCP) metals are lightweight metals. With the increasing application of light metal products, the production of light metal is increasingly attracting the attentions of researchers worldwide. To obtain a better understanding of the deformation mechanism of HCP metals (especially for Mg and its alloys), a new constitutive analysis was carried out based on previous research. In this study, combining the theories of strain gradient and continuum mechanics, the equal channel angular pressing process is analyzed and a HCP crystal plasticity constitutive model is developed especially for Mg and its alloys. The influence of elevated temperature on the deformation mechanism of the Mg alloy (slip and twin) is novelly introduced into a crystal plasticity constitutive model. The solution for the new developed constitutive model is established on the basis of the Lagrangian iterations and Newton Raphson simplification.