In the present study, the extraction of rare earth elements (REEs) from waste neodymium magnets using phosphorus ionic liquid Cyphos IL 104 was investigated. The objective was to recover and separate the heavy REE (Dy) from light REEs (Nd and Pr). Therefore, the experimental parameters of ionic liquid extraction, including contacting time, the initial pH value, extractant concentration, and O/A ratio, have been optimized. The highest separation factor αDy/Nd of 45.18 and αDy/Pr of 47.93 has been achieved. Following the ionic liquid extraction, the comparison of different stripping agents and the stripping parameters (the concentration of stripping agent and A/O ratio) were also explored. In short terms, this research demonstrates the optimal parameters of Cyphos IL 104 for selectively extracting high REE (Dy) and reveals its potential for recovering and separating REEs in real waste.