In this report, the structural and optical properties of sol-gel derived MgxZn1-xO thin films upon changes in the composition and annealing temperature were investigated. The Mg2+ content and the annealing temperature were varied in the range of 0≤x≤0.35 and 400˚C≤T≤600˚C, respectively. The films exhibited a hexagonal wurtzite structure of a polycrystalline nature. The optical transmittance exceeded 85% and the optical band gap of the film was tuned as high as 3.84 eV at a value of x = 0.35 (annealed at 400˚C), which was evidently the maximum Mg2+ content for the single-phase polycrystalline MgxZn1-xO thin films prepared in this experiment. The optical band gap and photoluminescence emission were tailored to the higher energy side while maintaining crystallinity without a significant change of the lattice constant.