Heavy-metal-contaminated wastewater is harmful to human beings as well as to the environment. Heavy metals are easily soluble in acidic conditions; thus, chemical treatment is necessary for this type of wastewater. Hydroxide precipitation of heavy metals is a simple and low-cost process that was used in this research. Palm oil fuel ash (POFA) was used to synthesize an alkali-activated material (AAM) for use as a pH modifier and hydroxide (OH− ion) releasing agent in Cu and Zn contaminated solutions. The released hydroxide reacts with Cu2+ and Zn2+ ions and forms metal hydroxide, which was removed from the wastewater by precipitation. The final concentrations of Cu2+ and Zn2+ ions in the solution were lower than the standard allowances of 5 and 2 ppm, respectively. The retention time and pH value of the solution played an important role in the final concentration of metal ions. The hydroxide precipitate was removed from the solution by a simple filtration process. Tests also showed that the POFA alkali-activated material could be reused. The precipitation method using POFA alkali-activated material is, therefore, a simple and cost-effective method for wastewater treatment. Heavy-metal-contaminated agricultural wastes can be converted into useful composite, leading to green and sustainable products