Single-crystalline Zn1-xMgxO thin films with c-axis orientation have been deposited on Si( 100) substrate by pulsed laser deposition. The effect of the thickness, Mg content, annealing temperature and oxygen atmosphere on the structure, morphology and photoluminescence of the Zn1-xMgxO thin films are studied by X-ray diffraction, atomic force microscopy, scanning electron microscopy and photoluminescence spectra. The results indicate that the hexagonal wurtzite type of Zn1-xMgxO can be stabilized up to Mg content x < 0.15, and the cubic type can be observed when 0. 25 <= x <= 0. 35. The grain size of the samples increased by the post-annealing, and the structure of the Zn0.75Mg0.25O film changed from cubic to hexagonal wurtzite type when annealed at 600 degrees C. An appropriate oxygen pressure can reduce both the number of defects and the c-axis stress. But superfluous oxygen is apt to combine with Mg and hinders the growth of hexagonal wurtzite type ZnO. Photoluminescence spectrum indicates that the defect-level peak is mainly related with the zinc vacancy, substitutional O on the zinc site (O-Zn) and interstitial oxygen vacancies (O-i), and the ultraviolet emission peak has a blue shift due to annealing.