Al–Zn composite coating can provide effective cathodic protection for E235 steel. This study aims to obtain the Al–Zn composite coating with the best anti-corrosion performance by optimizing the spraying temperature, spraying distance and powder-feeding motor speed. The Al and Zn powders were analyzed by scanning electron microscope (SEM), and the microstructure of the coatings prepared by different process parameters was observed by optical microscope. The mechanical and anticorrosive properties of the coating were evaluated using hardness, porosity, thickness and electrochemical tests. According to the experimental results, when the spraying temperature, spraying distance and powder-feeding motor speed were 500 °C, 27 mm and 1.5 r/min, respectively, the hardness of the coating was 67 HV, the porosity was 0.57% and the thickness was 0.588 mm. The EIS test results show that the coating has the maximum polarization resistance, and therefore the coating has good corrosion resistance at this parameter.