The excellent structural and optical properties of pseudomorphic MgxZn1-xO films (0 <= x <= 0.39) are reported in this work. The MgxZn1-xO films were grown on Zn-polar ZnO substrates by plasma-assisted molecular beam epitaxy. Those MgxZn1-xO films for which x <= 0.18 exhibited atomically flat surfaces, and the typical full-width-at-half-maximum (FWHM) value of the (0002) X-ray diffraction omega-rocking curves for these films was 35 arcsec. The FWHM values were less than 100 meV for the near-band-edge photoluminescence (PL) at 300 K. We observed PL lifetimes of the order of ns, and the longest fast-decay component reached 3.5 ns for the Mg0.12Zn0.88O alloy.