The effects of single aging, delayed aging and pre-delayed aging treatment on the corrosion resistance of Al-Mg-Si alloy were studied by scanning Kelvin probe force microscopy (SKPFM), transmission electron microscopy (TEM), scanning electron microscopy (SEM), three-dimensional X-ray tomography (3D-XRT), confocal laser scanning microscopy (CLSM) and electrochemical measurements. The surface potentials of Al(MnFe)Si, Mg2Si, and Si-rich remnant phases are determined, identifying Al(MnFe)Si phase as the crucial cathodic site for corrosion initiation, and the increase in surface potential implies an accelerated corrosion rate after immersion. The intergranular corrosion susceptibility of the alloy is predominantly influenced by the microstructure caused by aging conditions. The factors affecting corrosion resistance are summarized as (i) adjustment of electrochemical reaction activity by controlling the area fraction of Al(MnFe)Si phase, (ii) the spacing of grain boundary precipitates (GBPs), and (iii) the width of the precipitation-free zone (PFZ). The delayed aging (DA) sample exhibits inferior corrosion resistance due to the continuous GBPs and extended sub-grain boundaries corrosion propagation paths. The pre-delayed aging treatment successfully mitigates the corrosion degree of DA by widening the GBPs spacing and narrowing the PFZ width. This suggests that pre-aging treatment is a potent strategy for enhancing corrosion resistance without compromising the alloy's strength.