The purpose of this study is to examine the impact of various milling parameters and sample preparation methods on the end-milling of EV31A Mg alloy under as-cast, T4, and T6 heat-treated conditions. The test specimens were prepared through stir-casting and heat-treated according to T4 and T6 conditions. The CNC vertical milling machine with the HSS tool was used for the end-milling process based on Taguchi's L9 orthogonal array. Three levels of variation are applied to the process parameters, including spindle speed (S), feed rate (f), depth of cut (d), and test specimen (as-cast, T4, and T6 EV31A). The parameters of surface roughness (Ra, Rz, Sa, Sz), the rate of material removal (MRR), and the cutting force (Fr) were similarly measured. For surface roughness, optical profilometry was used, while the weight loss method and dynamometer were employed, respectively, to assess MRR and Fr. In order to improve the process parameters, TOPSIS (techniques order preferences by similarity to ideal solution) is employed. This method reduces several responses to a single measurable response (the closeness coefficient). S = 1500 rpm, f = 150 mm/min, and aP = 1.5 mm are the ideal process parameters to achieve the maximum closeness coefficient (Ci) of 0. 917129 under as-cast circumstances. Furthermore, analysis of variance (ANOVA) verifies that sample preparation methods of 24.59 % and depth of cut of 38.19 % significantly impact response characteristics.