Zinc oxide (ZnO)–single-walled carbon nanotubes (SWCNTs) nanocomposite thin films have been grown by chemical bath deposition method. The changes in structural and chemical properties were studied by means of x-ray diffraction, field-emission scanning electron microscopy (FESEM), transmission electron microscopy (TEM) and Fourier transform infrared spectroscopy (FTIR). The average crystallite size of ZnO doped with 0.1 and 0.5 wt% SWCNTs was measured about 14.69 and 17.76 nm, respectively. Texture coefficient of the carbon peak (002) was investigated as more than 3.2995 for ZnO mixed with 0.5 wt% SWCNTs. SEM images revealed the ZnO and SWCNTs entangled between the particles. TEM images estimated the inner and outer diameters of SWCNTs to be about 4.86 and 11.32 nm, respectively. FTIR analysis proved the formation of Zn–O and C bonding in the thin films. The performance of the dye-sensitized solar cells (DSSCs) was found to depend on the loading of SWCNTs. The power conversion efficiency increased from 0.078 to 0.684% after loading with 0.1 wt% SWCNTs. Higher amount of SWCNTs (0.5 wt%) was determined as ineffective in improving the performance of ZnO-based DSSCs.