Residual ammonium salt in closed rare earth mining sites leads to elevated levels of ammonia nitrogen in the surrounding environment. To mitigate ammonia nitrogen pollution at its source, a cost-effective and environmentally friendly recycling process was proposed. This process involves leaching residual ammonia nitrogen using a magnesium sulfate solution, followed by chemical precipitation for ammonia nitrogen removal. Additionally, nitrogen can be recovered as ammonia gas through the thermal decomposition of precipitates, allowing for further ammonia nitrogen adsorption from the leachate. The residual ammonium salts leaching rate reached 96.38 % with a 0.1 mol/L magnesium sulfate solution at a flow rate of 0.6 mL/min. The chemical precipitation method achieved a maximum nitrogen removal rate of 86.87 %, with an activation energy of 2.6 kJ/mol, indicating a relatively rapid process. At 190 °C, the ammonia nitrogen release rate of precipitates was 82.5 % after 2 h of thermal decomposition. The adsorption process was consistent with pseudo-second-order kinetics models using thermal decomposition products. Overall, the comprehensive removal rate of residual ammonium salts from the closed rare earth mining site was approximately 83.3 % in recycling process, optimizing the utilization of phosphorus, magnesium, and nitrogen and achieving efficient and environmentally friendly nitrogen removal.