In order to investigate the effect of friction stir processing on the corrosion performance of AZ31 magnesium alloy,the corrosion behavior of AZ31 base material and FSP-AZ31 under different process parameters in 3.5 wt.%sodium chloride solution was studied using stereoscopy,optical micros-copy,contact angle measurement,electrochemical workstation and other equipments.The results show that the corrosion mechanism of FSP-AZ31 and the base metal is pitting corrosion in the range of rotat-ing speed 800-1200 r/min and processing speed 80-120 mm/min.Compared with the base metal,FSP-AZ31 has a lighter degree of pitting corrosion,the self-corrosion current density is reduced,the impedance is increased,and FSP can improve the corrosion resistance of AZ31 magnesium alloy.When the processing speed is 100 mm/min,as the rotation speed increases,the self-corrosion current density of FSP-AZ31 is continuously decreased,and the performance of corrosion resistance is continuously improved.When the rotation speed is 1200 r/min,the self-corrosion current density of the sample reaches the minimum value of 9.2×10-5 A·cm-2.When the rotation speed is 1000 r/min,as the pro-cessing speed decreases,the self-corrosion current density of FSP-AZ31 is continuously decreased,and the performance of corrosion resistance is continuously improved.When the processing speed is 80 mm/min,the corrosion current density of the sample reaches the minimum,with a value of 7.6×10-5 A·cm-2.Compared to AZ31 magnesium alloy,the contact angle of FSP-AZ31 is increased from 29.703 ° to 58.448 ° under 1000 r/min and 80 mm/min.