A foaming process was used to prepare porous polymer membranes (PPMs) based on poly(vinylidene diflouride-co-hexafluoropropylene) copolymer for lithium ion batteries. In this simple process, urea, the foaming agent, was decomposed into gases and was removed at an elevated temperature to get the porous structure within the polymer matrix. When the weight ratio of urea to P(VDF-HFP) is 5:6, the PPM presents the highest porosity, 70.2%, and the prepared gelled polymer electrolyte shows an ionic conductivity up to 1.43×10−3 Scm−1 at room temperature. This provides another way to prepare gelled polymer electrolytes easily for application in rechargeable lithium batteries.