Summary The aspiration of employing metallic lithium (Li) as the anode is impeded by Li dendrites and unwanted redox shuttles in liquid electrolytes. In this study, a repellent used to safeguard the Li anode was demonstrated during the lithiation of a nanosized AlPO4 additive in an infiltrated quasi-solid electrolyte (i-QSE) containing a concentrated electrolyte in a poly(tri-acrylate) network. As a result of the infiltrated structure, the ion transfer number of i-QSE attained 0.79, and the activation energy was only 0.12 eV. Compared with the control counterpart, the repellent composed of Al-containing (oxy)fluorides played a vital role in stabilizing the interface and promoted the cycling durability of batteries (capacity retention >85% after 200 cycles) with a 1 C rate at an elevated temperature (55°C) without dendrite growth and by-product drifting. Such in situ generation of a repellent for a Li anode is a valid approach for metal-anode protection at the interface-engineering level.