Anti-rollover is an important performance for automated heavy trucks, which has been seldomly considered in the motion planning. This paper proposes an anti-rollover motion planning based on model predictive control (MPC) for automated heavy trucks. Taking the coupling of roll motion of sprung mass of the front axle with that of the drive axle into consideration, a seven degrees of freedom rollover dynamics model is established, and an evaluation index that can accurately describe the rollover motion is derived for heavy trucks. Then, a model predictive control strategy is designed for motion planning that combines the rollover dynamics, the artificial potential field for obstacle avoidance, and the trajectory tracking. In addition, the optimal path is calculated that considers collision avoidance, anti-rollover and vehicle dynamic constraints. Furthermore, three typical scenarios are applied to validate the performance of the proposed motion planning algorithm. The obtained results demonstrate that the proposed anti-rollover motion planning can effectively avoid collisions and reduce the rollover risk simultaneously when confronting edge scenarios.