The modified tannin by Mannich reaction was investigated for wastewater treatment. The removal of heavy metals, such as copper, chromium and mercury, in industrial wastewater was evaluated through the coagulation–flocculation technique, using modified Acacia tannin (MAT) as a coagulant agent. The successful tannin modification was evaluated by infrared spectopometry (FTIR), nuclear magnetic resonance (NMR); monitoring the removal of heavy metals was performed by atomic absorption (AA) and a direct mercury analyzer (DMA). Additionally, the parameters of water quality, total suspended solids (TSS), turbidity and chemical oxygen demand (COD) were assessed. Different doses of MAT were evaluated (375 ppm, 750 ppm, 1250 ppm and 1625 ppm) and three different levels of pH (4, 7 and 10). The highest percentages of removal obtained were copper 60%, chromium 87%, mercury 50%–80%, COD 88%, TSS 86% and turbidity 94%, which were achieved with the dose of 375 ppm of MAT at pH 10. The coagulation–flocculation process with the modified Acacia tannin is efficient for the removal of conventional parameters and for a significant removal of the metals studied.