In this work, the galvanic corrosion behavior of AZ31 magnesium alloy in contact with A6N01S-T5 aluminum alloy in NaCl solution was investigated by electrochemical method, the salt immersion method, SEM. And three protection techniques: (a) rubber gasket technique ,(b)organic coating technique and (c) anodizing technique were used to inhibit the galvanic corrosion. The results of open circuit potential and polarization curve method were explained the corrosion behavior of AZ31 and A6N01S-T5.It was found that AZ31 as anode was accelerated corrosion and A6N01S-T5 as cathode was also corrode in salt immersion experiment. With the increasing of immersion time, the corrosion rate of AZ31 and A6N01S-T5 was gradually decreasing. Then, the efficacy of different anti-corrosive technologies was compared. Fluorine coating technique was an effective way to protect Mg alloy and Al alloy. It was possible to guide the anti-corrosion of magnesium alloy in mobile industry.