LiFePO4 is considered to be one of the most important cathode materials for next-generation battery energy storage systems due to its relatively high theoretical capacity and cost effectiveness. However, similar to other lithium-ion batteries (NCA or NCM), the electrolyte corrosion for the electrodes has affected their electrochemical properties and hindered their application. Here, we use the EDP-GO for LiFePO4 battery (LiFePO4-GO-Li) to protect the cathode from the electrolyte corrosion and make the anode dendrite-free. In our work, the LiFePO4-GO-Li cell realizes a high discharge capacity (141.0 mA h g−1) at 1C (1C = 170 mA g−1) (Fig. 6a). And, as with the S-GO-Li, due to the in-situ rGO electrode-coating layer, the discharge capacity also increases from 141.0 mA h g−1 to 149.6 mA h g−1 in the first few cycles and shows capacity retention of over 94.5% for 200 cycles with nearly 100% coulombic efficiency. In contrast, the bare LiFePO4-Li cell exhibits lower capacity with capacity retention of 69.7%. The cyclic voltammetry (CV) of LiFePO4-GO-Li cell is employed to further explain the above phenomenon (Fig. 6b). The LiFePO4-GO-Li cell is tested in a voltage range of 2–4.2 V at a scanning speed of 0.1 mV s−1. The partial enlarged detail in Fig. 6b shows that the discharge capacity of LiFePO4-GO-Li battery increases from the initial cycle to the third cycle and the cathodic peak gradually moves to 3.4 V. The results are perfectly consistent with the cycle performance. To better understand the redox behavior during the discharge/charge process, LiFePO4-GO-Li and LiFePO4-Li batteries are measured at different C-rates (Fig. 6c). The LiFePO4-Li battery suffers from dramatic capacity decay. At 0.2C, the initial capacity can reach up to 168.2 mA h g−1, decreasing to a final value of 45.7 mA h g−1 at 10C. In contrast, the LiFePO4-GO-Li battery demonstrates much better performance. After an initial capacity of approximately 173.5 mA h g−1 at 0.2C, the retention capacity reaches a final value of 104.6 mA h g−1. When cycling at 0.5C, 1C, 2C, 5C, and 10C, the capacities remain at 155.1 mA h g−1, 142.5 mA h g−1, 128.4 mA h g−1, 117.5 mA h g−1, and 104.6 mA h g−1, respectively. Finally, the capacity returns to 154.8 mA h g−1 at 0.5C. In addition, the X-ray photoelectron spectroscopy (XPS) measurements are employed to study the C 1 s of LiFePO4 cathode after cycles. The C-O peak intensity (~285.9 eV) of the LiFePO4 cathode with rGO (Fig. 6d) significantly decreases compared to the original GO, indicating that most of the oxygenated functional groups have been removed. Afterwards, the in-situ rGO can be seen both from the SEM of the lithium anode (Fig. 6e) and the LiFePO4 cathode (Fig. 6f). Compared to the cathode in LiFePO4-GO-Li battery, the pure LiFePO4 cathode has been badly damaged by electrolyte (Supplementary Fig. 8). Supplementary Fig. 9 shows Raman spectra of LiFePO4-GO-Li at various cell voltages during discharge. The ID/IG of both batteries increase from 0.90 to 1.20 as the voltage decreasing continuously, respectively. This result indicates that the defection in rGO structure increases upon the reduction of GO. In brief, the in-situ rGO plays the most important role for stabilizing the structure of the cathode and protecting the electrode from the electrolyte corrosion. Also, the in-situ rGO can be as a protective layer to control the formation of lithium dendrite. The LiFePO4/rGO-Li and LiFePO4-Li/rGO was also shown in Supplementary Fig. 10 with capacity retention of 86.3% and 75.4% for 200 cycles, respectively.