Hydrogels based on copolymers of (3-acrylamidopropyl)trimethylammonium chloride (DMAPAA-Q) and N,N′methylenebisacrylamide were prepared for use in recovery of metal ions. Carbonate ions or oxalate ions, which are suitable for rare earth element (REE) ion recovery, were loaded into the hydrogel by immersing the gel in a solution containing the anions. e anion-loaded hydrogel was then added to a solution of neodymium (Nd) nitrate, dysprosium (Dy) nitrate, cobalt (Co) nitrate, or samarium (Sm) nitrate. e metal ions (Dy, Nd, Co, Sm) di used into the gel and reacted with the supported anions to form sparingly soluble metal salts in hydrogel, which were easy to recover from the solution. e metal ions could be recovered from mixtures of Dy and Nd nitrates or Co and Sm nitrates in solution, which were assumed to be actual magnet waste solutions, as well as in the case of single ion solutions. Slight di erences were found in the amount of each metal ion recovered, which were attributed to di erences in solubility product of each ion with the loaded anions carbonate and oxalate. Furthermore, it was found that a gel could be regenerated by immersing it in a solution containing the anions when its recovery amount had reached the maximum value. Gels could be used repeatedly for metal ion recovery without loss of capacity. erefore, a new metal ion recovery method using hydrogel with a quaternary amine in the sidechain to support anions is presented, which is simpler than the conventional recovery by precipitation or adsorption.