The practical application of lithium-metal anodes in high-energy-density rechargeable lithium batteries is hindered by the uncontrolled growth of lithium dendrites and limited cycle life. An ether-based gel polymer electrolyte (GPE-H) is developed through in situ polymerization method, which has close contact with the electrode interface. Based on DFT calculations, it was confirmed that the cationic groups produced by polar solvent tris(1,1,1,3,3,3-hexafluoroisopropyl) (HFiP) initiate the ring-opening polymerization of DOL in the battery. As a result, GPE-H achieves considerable ionic conductivity (1.6 × 10–3 S cm–1) at ambient temperature, high lithium-ion transference number (tLi+ > 0.6) and an electrochemical stability window as high as 4.5 V. GPE-H can achieve up to 800 h uniform lithium plating/stripping at a current density of 1.65 mA cm–2 in Li symmetrical batteries. Li–S and LiFePO4 batteries using this GPE-H have long cycle performances at ambient temperature and high Coulomb efficiency (CE > 99.2%). From the above, in situ polymerized GPE-H electrolytes are promising candidates for high-energy-density rechargeable lithium batteries.