The polymer electrolytes based on a novel poly((4-vinylbenzyl)trimethylammonium bis(trifluoromethanesulfonylimide)) polymeric ionic liquid (PIL) as polymer host and containing DEME-TFSI ionic liquid, LiTFSI salt and nano silica are prepared. The polymer electrolyte is chemically stable even at a higher temperature of 60°C in contact with lithium anode. Particularly, the electrolyte exhibits high lithium ion conductivity, wide electrochemical stability window and good lithium stripping/plating performance. When the IL content reaches 60% (the weight ratio of DEME-TFSI/PIL), the PIL electrolyte presents a higher ionic conductivity, and it is 7.58×10−4 S cm−1 at 60°C. Preliminary battery tests show that Li/LiFePO4 cells with the PIL electrolytes are capable to deliver above 130 mAh g−1 at 60°C with very good capacity retention.