As the electron transport layer of dye-sensitized solar cells (DSSCs), the photoanode is an important component that affects photoelectric conversion efficiency (PCE). The commonly used material titanium dioxide (TiO2) is difficult to prepare as nanostructures with large specific surface area, which affects dye loading and electrolyte diffusion. Herein, TiO2 nanofibers and ZnO-TiO2 composite nanofibers with different molar ratios are synthesized by electrospinning technology. The above nanofibers are coated on photoanodes by the doctor blade method to assemble DSSCs. The influence of the composite ratio of ZnO-TiO2 composite nanofibers on the photoelectric performance of the assembled DSSCs is explored. The ZnO-TiO2 composite nanofibers with a molar ratio of 1 : 2 have large specific surface area and porosity and have the smallest charge transfer resistance at the photoanode-electrolyte interface. The PCE of the nanofiber-modified DSSCs reaches a maximum of 3.66%, which is 56% higher than that of the TiO2 nanofiber-modified DSSCs. The photovoltaic parameters such as open circuit voltage (VOC), current density (JSC), and fill factor (FF) are 0.58 V, 10.36 mA/cm2, and 0.61, respectively. Proper compounding of zinc oxide (ZnO) can not only make the nanofibers absorb more dyes and enhance the light-harvesting ability but also improve the diffusion of the electrolyte and enhance the electron transport, thus successfully improving the power conversion efficiency of DSSCs.