Rechargeable battery technology based on the lithium (Li) metal anode is plagued by the unstable solid-electrolyte interphase (SEI), which grows upon cycling and is associated with dendritic/mossy Li deposition. A key challenge in improving SEI stability lies in regulating its chemical composition and nanostructure. Here we report a new approach that enables the design of SEI layers with tunable structure and stable properties. This involves the use of a reactive polymeric composite, which can generate a stable SEI layer in situ by reacting with Li to occupy surface sites and then electrochemically decomposing to form nanoscale SEI components. Cryo-TEM shows that the resulting SEI layer is composed of organic polymeric Li salts, nanoparticles of inorganic Li salts, and two-dimensional nanosheet components. This conformal nanocomposite SEI layer exhibits excellent passivation, homogeneity, ionic conductivity, and mechanical strength and stabilizes the interface for dendrite-free Li deposition in a conventional carbonate electrolyte. 950-cycle life was achieved in a full cell paired with a LiNi0.5Co0.2Mn0.3O2 cathode. Moreover, under lean electrolyte conditions, the full cells also show significantly extended cycle lives, owing to the excellent stability of the polymeric nanocomposite SEI.