The corrosion behavior of as-cast AZ91C magnesium alloy was studied by performing friction stir processing (FSP) and FSP followed by solution annealing and then aging. Phase analysis, microstructural characterization, potentiodynamic polarization test and immersion tests were carried out to relate the corrosion behavior to the samples microstructure. The microstructural observations revealed the breakage and dissolution of coarse dendritic microstructure as well as the coarse secondary β-Mg17Al12 phase which resulted in a homogenized and fine grained microstructure (15μm). T6 heat treatment resulted in an excessive growth and dispersion of the secondary phases in the microstructure of FSP zone. The potentiodynamic polarization and immersion tests proved a significant effect of both FSP and FSP followed by T6 on increasing the corrosion resistance of the cast AZ91C magnesium alloy. Improve in corrosion resistance after FSP was attributed to grain refinement and elimination of segregations and casting defects which makes more adhesive passive layer. Increase in volume fraction of precipitations after T6 heat treatment is determined to be the main factor which stabilizes the passive layer at different polarization values and is considered to be responsible for increasing the corrosion resistance.