Deposition of Zn1-x Mg x O thin films on glass substrates has been investigated by the simple and cost-effective mist CVD technique. A water solution of zinc acetate and magnesium acetate was used as the source of Zn and Mg. The solution was ultrasonically atomized, and the aerosols hence formed were supplied by the N2 carrier gas to the substrates. The band gap energy of ZnMgO was successfully controlled from 3.25 eV (ZnO) to 3.75 eV with the concentration ratio [Mg]/([Zn]+[Mg]) in the solution. The transparency in the visible region was higher than 90% and the surface RMS roughness was 7.5 nm (an example for ZnO) despite the polycrystalline structure; they are satisfactory for the optical applications. A UV photodetctor with interdigital electrode structure on the ZnMgO surface was fabricated, where the photoresponsivity of 2.6 A/W at 350 nm and the lowest detectable power of about 1 μW were obtained. Although these values are satisfactory for the simple UV detection but the existence of deep defects is deteriorating the dynamic response of the detector device.