Effects of magnesium and pH on corrosion of aluminum galvanically coupled to iron have studied by using potentio- dynamic and static tests for polarization curves, Mott-Schottky test for analysis of semiconductor property, and GD-AES and XPS for film analysis. Pitting potential was sensitive to magnesium as an alloying element but not to pH, while passive current was sensitive to pH but not to magnesium. It was explained with, instead of point defect model (PDM), surface charge model describing that the ingression of chloride depends on the state of surface charge and passive film at film/solution interface is affected by pH. In addition, galvanic current of aluminum electrically coupled to iron was not affected by magnesium in pH 8.4, 0.2M citrate solution but was increased by magnesium at the solution of pH 9.1. The galvanic current at pH 9.1 increased with time at the initial stage and after the exposure of about 200 minute, decreased and stabilized. The behavior of the galvanic current was related with the concentration of magnesium at the surface. It agreed with the depletion of magnesium at the oxide surface by using glow discharge atomic emission spectroscopy (GD-AES). In addition, pitting potential of pure aluminum was reduced in neutral pH solution where chloride ion maybe are competitively adsorbed on pure aluminum. It was confirmed by the exponential decrease of pitting potential with log of [$Cl^-$] around 0.025 M of [$Cl^-$] and linear decrease of the pitting potential. From the above results, unlike magnesium, alloying elements with higher electron negativity, lowering isoelectric point (ISE), are recommended to be added to improve pitting corrosion resistance of aluminum and its alloys in neutral solutions as well as their galvanic corrosion resistance in weakly basic solutions.