Rare earth elements (REEs) have become increasingly important materials owing to their use in the high-tech and clean-energy industries. However, the unpredictable supply, possible health risks, and environmentally unsustainable extraction practices associated with REEs have encouraged the development of green technologies for the selective extraction and recovery of metals. This study presents a simple and innovative approach for the selective extraction and recovery of total REEs. Elastin-like polypeptide (ELP) and the REE-binding domain (lanmodulin) are fused to form REEs-sensitive and thermo-responsive genetically encoded ELP called RELP, where ELP offered a reversible, inverse phase transition for repeated uses. The RELP are purified and used for the selective extraction of total REEs from competing non-REEs metals by controlling the solution temperature (4 and 37 °C) and pH. RELP exhibit high REE specificity, even in the presence of non-REE metal ions. The bound REEs are readily recovered during at least six repeated cycles, and the efficiency is maintained. Moreover, REEs are selectively recovered by RELP from steel slag leachate, a potential industrial source of REEs. RELP offers a rapid, selective, and scalable method for REE extraction and recovery. This technology can be adapted to recover other precious metals and commodities.