Sol-gel technique is used to synthesize as-grown zinc oxide (ZnO) and iron-nickel (Fe-Ni) co-doped ZnO thin films deposited on glass substrates using dip coating technique. The structural properties and crystal imperfections of as-prepared thin films are investigated. We performed the structural analysis of films using X-ray diffraction (XRD). The XRD analysis reveal that the as-prepared films exhibit wurtzite structure. Furthermore, XRD-line profile analysis is performed to study the correlation between structural properties and imperfections of the nanocomposite thin films. The crystallite size and microstrains parameters are predicted using the Williamson–Hall method. We found that the crystallites size increases as the co-doped (Fe-Ni) concentration is increased. However, microstrains of the nanocomposite films decreases as (Fe-Ni) concentration is increased. The optical properties of the (Fe-Ni) co-doped nanocomposite films are investigated by performing UV-Vis (250 nm–700 nm) spectrophotometer measurements. We found that as the (Fe-Ni) concentration level is steadily increased, transmittance of the undoped ZnO thin films is decreased. Remarkably, refractive index of undoped ZnO thin films is found to exhibit values extending from 1.55 to1.88 that would increase as (Fe-Ni) concentration is increased.