The corrosion behaviors of an as-forged AZ80 magnesium alloy after aging treatment for various durations at 170 °C were investigated by immersion test, H2 evolution test, SEM and potentiodynamic polarization curve measurement. The results show that the corrosion rate of the alloy decreases dramatically with the increase of aging time during the initial aging stage, but increases slowly with the aging time longer than 20 h. The volume fraction of β-Mg17Al12 increases with aging time within the first 20 h, leading to the decrease of corrosion rate. After aging for longer than 39 h, the growth of β phase is accompanied by the consumption of aluminum in the matrix, resulting in an increase in the corrosion rate. When the volume fraction of ? phase is low, specimens suffer from severe local corrosion, which results in a porous surface. On the contrary, when the volume fraction of ? phase is high, specimens suffer uniform corrosion attack.