ZIF-8, a kind of widely studied metal-organic frameworks, was used for the interfacial modification of dye-sensitized solar cells by a facile post-treatment strategy for the first time, which solved the problem of severely decreased short-circuit photocurrent in previous report. After the surface treatment, the performance of cells was obviously improved. The conditions for the deposition of ZIF-8 were optimized. The best photovoltaic property was obtained when the growth time of ZIF-8 was 7 min and the TiO2 photoanode was post-treated for 2 times. Besides the energy barrier effect of ZIF-8 that improved the open-circuit photovoltage and electron lifetime, the dyes adsorbed tightly on TiO2 surface was found to be a key point for the efficient electron injection and improved performance.