Nanocomposite polymer electrolytes were prepared by dispersing different compositions of nanosized magnesium oxide (MgO) as ceramic nanofiller in poly(ethyl methacrylate) (PEMA)−20 wt% magnesium triflate (MgTf2)−40 wt% 1‐ethyl‐3‐methylimidazolium bis(trifluoromethylsulfonyl) imide (EMITFSI) electrolytes. The role of ionic liquid, magnesium salt, and ceramic nanofiller were visualized by various physical and electrochemical analyses including scanning electron microscopy, thermogravimetric analysis, electrical impedance spectroscopy, and linear sweep voltammetry. The improvement of ionic liquid retention property has been observed by formation of free standing films of PEMA–40 wt% EMITFSI–20 wt% MgTf2 dispersed with MgO. The smoothness of the films’ surface observed in SEM images suggested the amorphous nature of the films. The room temperature ionic conductivity was improved up to 10−5 S/cm by the incorporation of 1 wt% of MgO nanofiller in the polymer electrolytes. Temperature dependent ionic conductivity showed the Arrhenius‐like behavior with ionic conductivity of 3.78 × 10−4 S/cm at 100°C. The polymer electrolyte also showed enhanced electrochemical stability window. POLYM. COMPOS., 39:1500–1506, 2018. © 2016 Society of Plastics Engineers