The MgxZn1-xO(x=0.1,0.2,0.3, 0.4,0.5,0.6 and 0.7)thin films were prepared on glass substrate by the Sol-Gel method. The X-ray diffraction results show that when the value of x is between 0.1 and 0.3, the thin film has the structure of hexagonal wurtzite while the angle of diffraction peak becomes bigger with increasing x, and the MgO impurity phase segregates at x=0.4. The ultraviolet photoluminescence spectra of the films show ultraviolet emission peak at room temperature, which has an increasing blue shift with the increasing content of Mg. The band gap of ZnO broadens with Mg-doping concentration increasing from 0.1 to 0.3. For the sample with x=0.1 annealed at 500℃, the crystal quality of the films is improved with the increase of the rate of temperature rise from 4.5℃/min to 6.0℃/min. For the sample with x=0.2, the crystal quality of the films is improved with the increase in annealing temperature from 500℃ to 560℃. With the annealing temperature increasing above 590 ℃ the crystal quality of the films degenerates.