Microstructure evolution of the homogenised ZK40 magnesium alloy was investigated during compression in the temperature range of 250–400°C and at the strain rate range of 0·01–50 s−1. At a higher strain rate (⩾10 s−1), dynamic recrystallisation developed extensively at grain boundaries and twins, resulting in a more homogeneous microstructure than the other conditions. The hot deformation characteristics of ZK40 exhibited an abnormal relationship with the strain rate, i.e., the hot workability increased with increasing the strain rate. However, the dynamic recrystallisation grain size was almost the same with increasing the temperature at the strain rate of 10 s−1, while it increased obviously at the strain rates of 20 and 50 s−1. Therefore, hot deformation at the strain rate of 10 s−1 and temperature range of 250–400°C was desirable and feasible for the ZK40 alloy.