The massive use of lithium batteries in industries, such as automotive and electrical network accumulation, requires the development of safer electrolytes, economic and possibly made from renewable resources using eco-friendly processes. In this work, we reported the synthesis and the physico-chemical and functional characterization of a polymer gel electrolyte (GPE) based on a skeleton of polyhydroxyalkanoate obtained from biomass by means of an easy and environmentally friendly chemical process. The GPE has an ionic conductivity of 0.8mScm−1 at room temperature, is thermally stable up to over 100°C and is not flammable. The electrochemical stability window is higher than 5V. The cell Li/GPE/LiFePO4 shows specific capacity of 100 mAhg−1 at 3C with 100% coulombic efficiency. These results demonstrate that the GPE based on polyhydroxyalkanoate is very promising for use in lithium batteries of high power density.