Linking an ester group to the imidazolium ring has been demonstrated to improve solar cell performance in terms of short-circuit photocurrent (Jsc), open-circuit photovoltage (Voc), and fill factor (FF) in particular, when the imidazolium iodide mixed with iodine and LiI is used as a solid state electrolyte of dye-sensitized solar cells. Herein, the effect of ester group on solar cell performance has been investigated by means of intensity modulated photocurrent/photovoltage and electrochemical impedance spectroscopy. From the alkyl- to ester-functionalized imidazolium iodide, the increase in Jsc is attributed to the increased charge collection efficiency due to the enhanced conductivity, the increase in Voc is caused by the upward shift of conduction band edge of TiO2, which compensates for the voltage loss arising from the higher charge recombination rate, and the remarkable increase in FF is attributed to the decreased series resistance along with the increased Voc and decreased diode quality factor.