Polymerized aluminum magnesium chloride (PAMC) flocculant was prepared from gangue as a raw material, and the effects of pH, the polymerization time, and the polymerization temperature on the performance of the PAMC were investigated by a one-factor test, based on which, orthogonal experiments (three-factor and two-level) were conducted to optimize the relevant parameters. Meanwhile, FTIR and SEM were used to characterize the polymerized aluminum magnesium chloride, and the sample was applied in printing and dyeing wastewater treatment. The results showed that a pH value of 2.2 and a reaction at 60 °C for 4.5 h were the optimal preparation conditions; the characterization analysis showed that the synthesized product was polymerized aluminum magnesium chloride; the turbidity removal rate of the PAMC for printing and dyeing wastewater was increased by 2.1%, the COD removal rate was increased by 3.1%, the ammonia nitrogen removal rate was increased by 2.1%, and the chromaticity removal rate was increased by 9.2% compared with that of PAC.