In this study, the effects of magnesium addition on the microstructure and comprehensive properties of Al-5Si-5.3Cu-0.3Sr-0.2Zr-0.2Y-0.06Ti alloys were investigated by optical microscope, scanning electron microscope, transmission electron microscope, hardness tester, and tensile testing machine. It is found that the addition of magnesium increases the number of undissolved particles in the alloy. However, on the one hand, magnesium addition refines the theta ' phase and increases its number density in the alloy. On the other hand, it generates a smaller Q ' phase. Both phases can enhance the precipitation strengthening and dislocation strengthening of the alloy. In addition, adding magnesium reduces the width of the precipitation-free zone (PFZ) and changes the distribution of grain boundary precipitates (GBPs). At 1% magnesium addition, the dislocation strengthening and precipitation strengthening effects of the theta ' and Q ' phases were the best, the width of PFZ was the smallest, and the GBPs were discontinuously arranged along the PFZ. Therefore, a high-strength, high-hardness, and intergranular corrosion-resistant cast aluminum alloy with dense structure, a tensile strength of 364.4 MPa, elongation of 4.87%, hardness of 145.4 HV, and intergranular corrosion grade of 3 was obtained.