Studies on a novel magnesium ion conducting gel polymer electrolyte based on a room temperature ionic liquid (RTIL) is reported. It comprises a Mg-salt, Mg(CF3SO3)2 [or magnesium triflate, Mg(Tf)2] solution in an ionic liquid, 1-ethyl-3-methylimidazolium trifluoro-methanesulfonate (EMITf), immobilized with poly(vinylidene fluoride-hexafluoropropylene) (PVdF-HFP), which is a freestanding, semitransparent and flexible film with excellent mechanical strength. Physical and electrochemical analyses demonstrate promising characteristics of these films, suitable as electrolytes in rechargeable magnesium batteries. The material offers a maximum electrical conductivity of ∼4.8×10−3 Scm−1 at room temperature (20°C) with excellent thermal and electrochemical stabilities. Possible conformational changes in the polymer host PVdF-HFP due to ionic liquid solution entrapment and ion–polymer interaction are investigated by Fourier transform infra-red (FTIR), X-ray diffraction (XRD) and scanning electron microscopic (SEM) methods. The Mg2+ ion transport in the gel film is confirmed from cyclic voltammetry, impedance and transport number measurements. The Mg2+ ion transport number (t +) is ∼0.26, which indicates a substantial contribution of triflate anion transport along with ionic conduction due to the component ions of the ionic liquid.