The electrolyte–electrode interface serves as the foundation for a myriad of chemical and physical processes. In battery chemistry, the formation of a well-known solid–electrolyte interphase (SEI) plays a pivotal role in ensuring the reversible operations of rechargeable lithium-ion batteries (LIBs)1,2. However, characterizing the precise chemical composition of the low crystallinity and highly sensitive SEI presents a formidable challenge3. Here, taking lithium fluoride (LiF)—a widely studied and considered crucial SEI component4–7—as an example, we use 19F solid-state nuclear magnetic resonance (NMR) and identify that LiF formed in SEI (LiFSEI) has fruitful spectroscopy features that originated from the formation of limited LiF–LiH solid solutions: H-rich phase (LiH1−yFy) and F-rich phase (LiF1−xHx), which is further validated by 6Li isotope NMR, synchrotron X-ray diffraction and cryo-electron microscopy (cryo-EM). By characterizing SEI formed in various electrolytes, we confirm the dominance of LiH1−yFy in high-coulombic-efficiency electrolyte, which can be rationalized by the fact that LiF–LiH solid solution shows improved ionic conductivity over LiF. As a proof of concept, we demonstrate that LiH1−yFy-rich coating layer presents obvious advantages compared with LiF-rich coating layer in lithium-metal batteries. This revised understanding of the heterogeneous nature of SEI components would provide new insights for electrode–electrolyte interface design.