The recently developed advanced electrolytes possess many crucial qualities, including robust stability, Li dendrite-free, and comparable interface compatibility, for the manufacturing of Li metal batteries with a high energy density. In this study, lithium bis(trifluoromethane)sulfonimide, acrylamide, and succinonitrile were first used to design a polymerizable monomer. Then, it went through in situ thermal polymerization to attain a new solid polymer electrolyte [named poly(PDES)]. The synthesized poly(PDES) electrolyte achieved higher ionic conductivity (∼1.89 × 10 −3 S cm −1 ), oxidation potential (∼5.10 V versus Li + /Li), and a larger lithium-ion transfer number (∼0.63). Moreover, poly(PDES) was nonflammable and could effectively inhibit the formation of Li dendrites. As a result, the assembled batteries using the poly(PDES) electrolyte for both Li||LiFePO 4 and Li||LiNi 0.8 Co 0.1 Mn 0.1 O 2 exhibited excellent interface compatibility and electrochemical performances. This poly(PDES) electrolyte has promising potential for broad application in lithium−metal batteries with elevated energy density and safety performance in the near future.