Gel electrolyte is an ideal system for improving the cycling stability and safety of lithium metal battery. However, traditional gel system with acrylic ester system is still not suitable for high-voltage battery system limited by its intrinsic structure and unstable interface. The polymer structures with -CF3 modified acrylic ester are proposed to improve the stability of both structure and interface in high-voltage battery systems. The LiF-rich anode-electrolyte interface assisted by fluorine contained in-situ gel electrolyte ensures stable cycling of lithium anode. The quasi-solid state lithium battery assembled with the LiFePO4 can still achieve a capacity retention rate of 81.2 % after 900 cycles at a rate of 1 C. Furthermore, the uniform organic cathode-electrolyte interface constructed by crosslinked -CF3 modified polymer effectively inhibits the corrosion of HF on the cathode material. The interaction between the anion and solvent molecules prevents the continuous decomposition reaction of the electrolyte on the surface of the LiCoO2 cathode at high voltage, which guarantees LiCoO2 battery can still achieve a capacity retention rate of 82.1 % after 500 cycles at a voltage of 4.45V. Design of fluorine contained in-situ polymer gel electrolyte could promote the development of quasi solid-state battery in practical industrial application.