The influence of Ga and In on the microstructure and electrochemical performance of a Zn-Al alloy was investigated. It was found that the microstructure of the Zn-Al sacrificial anode can be significantly refined by Ga and In, but excess Ga or In leads to segregation. Electrochemical tests show that Zn-0.5Al-0.07 Ga and Zn-0.5Al-0.1In have the most negative OCPs, the corrosion products of which can easily flake off from the corroded surface, showing the good performance of cathodic protection. A small amount of Ga and In contribute to the corrosion of the Zn-Al alloy; however, excess Ga or In can improve the corrosion resistance of the alloy by refining the grains and making the surface of the oxide film form quickly.