Concentrated pig production is a major source of environmental pollution. Metal–organic frameworks (MOFs) show potential for reducing heavy metal pollution. Two zirconium-based octahedral MOFs, UiO-66 and UiO-66-NH2, were prepared by solvothermal method and were characterized by XRD, SEM, FT-IR, and BET. The adsorption capacity, treatability, and reusability of the adsorbents were tested in batch experiments. The optimum adsorbent dosage was 4 g/L, and the maximum removal rates at room temperature of chromium (Cr), manganese (Mn), iron (Fe), nickel (Ni), and Arsenic (As) on UiO-66 were 76.93%, 93.73%, 88.81%, 83.30%, and 86.11%, respectively. In the kinetic experiments, the adsorption process achieved equilibrium within 90 min and generally conformed to the quasi-second kinetics model. The results demonstrated that UiO-66 and UiO-66-NH2 can be used over a wide range of pH for removal of most HMs on a large scale. Meanwhile, the adsorbents maintained excellent adsorption capacity after at least 3 cycles. Overall, UiO-66 and UiO-66-NH2 have a high potential for practical application on the recovery of heavy metals in the complex wastewater from animal farms.