To study the influencing factors of process parameters on the wall thickness deviation and internal warpage deviation of the workpiece in magnesium alloy wheel hub spin molding, a two-pass heterogeneous spin molding model is proposed. To ensure the accuracy of the simulation results, the stress–strain data of AZ31 magnesium alloy at different temperatures and different strain rates were obtained through tests. Wall thickness deviation and internal warp deviation after molding were used as evaluation indexes of workpiece molding quality. ABAQUS software facilitated the numerical simulation and analysis of the magnesium alloy wheel hub spinning process. Gray relational degree analysis optimized the first-pass process parameters, elucidating the impact of the axial offset, the thinning ratio, and the feed ratio on forming quality. The application of optimized parameters in the hub spinning simulation resulted in a substantial 28.84% reduction in wall thickness deviation and a 4.88% reduction in inner diameter deviation. This study underscores the efficacy of employing Gray Relational Analysis for comprehensive parameter optimization, ensuring wheel hub quality. Moreover, it provides a theoretical foundation for enterprises to expedite research and development cycles and minimize associated costs.