Two types of polysiloxane grafted with different ratio of imidazolium iodide moieties (IL-) have been synthesized to develop a micro-porous polymer electrolyte for quasi-solid-state dye-sensitized solar cells. The samples were characterized by , FT-IR spectrum, XRD, TEM and SEM, respectively. Moreover, the ionic conductivity of the electrolytes was measured by electrochemical workstation. Nanostructured polysiloxane containing imidazolium iodide showed excellent compatibility with organic solvent and polymer matrix for its ionic liquid characteristics. Increasing the proportion of imidazolium iodide moieties in polysiloxane improved the electrochemical behavior of the gel polymer electrolyte. A dye-sensitized solar cell with gel polymer electrolyte yielded an open-circuit voltage of 0.70 V, short-circuit current of 11.19 mA , and the conversion efficiency of 3.61% at 1 sun illumination.