Transition metal (TM=Cu, Ni, Mn, Fe and Co)-doped ZnO:F thin films are deposited on glass substrates by a sol-gel method through using ethanol as solvent. All the samples are checked by using X-ray diffraction (XRD), atomic force microscope (AFM), X-ray photoelectron spectroscope (XPS), photoluminescence, UV spectrophotometer, and vibrating sample magnetometer. The XRD reveals that Cu, Ni, Mn, Fe and Co occupy the Zn sites successfully without changing the wurtzite structure of ZnO at moderate doping concentration, and no evidence of any secondary phases is found. The AFM measurements show that the average values of crystallite surface roughness of the samples are in a range from about 2 to 12.7 nm. The surface of ZnO:F thin film becomes less compact and uniform when ZnO:F thin film is doped with TM ions. The TM ions are indeed substituted at the Zn2+ site into the ZnO lattice as shown in the results obtained by XPS and XRD. Further studies show that most of the ZnO films exhibit preferred (002) orientations, while the best c-axis orientation occurs in Zn0.93Co0.05F0.02O film. However, the crystalline quality and preferential orientation of ZnO film become poor in Zn0.93Mn0.05F0.02O. The optical bandgaps of all the ZnO:F films decrease after doping TM. All the samples show high transmittance values in the visible region. Strong ultraviolet emission and weak blue emission are observed in the photoluminescence spectra measured at room temperature for all the samples. The Zn0.93Mn0.05F0.02O film shows the weakest ultraviolet emission peak and strongest blue emission peak, corresponding to the strongest ferromagnetism; while for the Zn0.96Cu0.02F0.02O film, the strongest ultraviolet emission peak and weakest blue emission peak are observed, accompanied by the weakest ferromagnetism. To determine the optical bandgap (Eg) of TM-doped ZnO:F thin film, we plot the curve of (α hv)2 versus photon energy (hv). It is found that the Eg decreases from 3.16 eV to 3.01 eV with the TM ions doping. We show the variations of saturation magnetization with the Vm O concentration for TM-doped ZnO:F thin films with the different transition metal ions. In the case of Cu-doped ZnO:F thin films, the ZnO sample shows that a weaker magnetism. ZnMnFO film exhibits well-defined hysteresis with a coercive field of 7.28×10-5 emu/g. Further studies reveal that these interesting magnetic properties are correlated with the defect-related model for ferromagnetism. Our results will expand the applications of ZnO:F thin films in visible light emitting diode, photovoltaic devices, photoelectrochromic devices, etc. Meanwhile, extreme cares should be taken to control the codoping of ZnO:F thin films for tuning the magnetization.