Specimens of ZM5 magnesium alloy were dipped into the mixed powder of Al and Zn at (390±5) ℃ for 8 h in argon gas protective environment and subjected to surface diffusion alloying processing (SDAP). The erosion wear behaviors of ZM5 magnesium alloy before and after SDAP were investigated in two different erosion wear environments: oil and quartz environment; tap water and quartz environment. The surfaces of erosion wear specimens exhibited cutting scratch grooves in the oil and quartz environment. Corrosive attack was weak and cutting wear mechanism was responsible for the mass loss. When the erosion wear medium was changed to tap water and quartz environment, corrosion pits and cracks were obviously observed after erosion wear test. The corrosion from tap water and the scour from quartz intensified mass losses. Compared with the untreated specimens, the application of SDAP improved the erosion wear resistance in the same environment.