This study presents an approach for developing periphytic biofilm with N-acyl-homoserine-lactones (AHLs) stimulation and lanthanum (La, a rare earth element) loading, to achieve highly efficient and stable phosphorus (P) recovery from wastewater. AHLs stimulated biofilm growth and formation, also improved stable P entrapment by enhancing extracellular polymeric substance (EPS) production and optimizing P-entrapment bacterial communities. Periphytic biofilms loading La is based on ligand exchanges, and La loading achieved initial rapid P entrapment by surface adsorption. The combination of AHLs stimulation and La loading achieved 99.0% P entrapment. Interestingly, the enhanced EPS production stimulated by AHLs protected biofilms against La. Moreover, a method for P and La separately recovery from biofilms was developed, achieving 89–96% of P and 88–93% of La recovery. This study offers a promising biotechnology to reuse La from La-rich wastewater and recover P by biofilm doped with La, which results in a win–win situation for resource sustainability.