The Mg0.1Zn0.9O films were grown using atomic layer deposition (ALD) system and applied to metal-semiconductor-metal ultraviolet photodetectors (MSM-UPDs) as an active layer. To suppress the dangling bonds on the Mg0.1Zn0.9O surface, the photoelectrochemical (PEC) treatment was used to passivate the Mg0.1Zn0.9O surface, which could reduce the dark current of the MSM-UPDs about one order. Beside, to increase more incident light into the Mg0.1Zn0.9O active layer of the MSM-UPDs, the 500-nm-diameter silica nanospheres were spin-coated on the Mg0.1Zn0.9O active layer to improve the antireflection capability at the wavelength of 340 nm. The reflectivity of the Mg0.1Zn0.9O films with silica nanospheres antireflection layer decreased about 7.0% in comparison with the Mg0.1Zn0.9O films without silica nanospheres. The photocurrent and UV-visible ratio of the passivated Mg0.1Zn0.9O MSM-UPDs with antireflection layer were enhanced to 5.85 μA and1.44×104, respectively, at the bias voltage of 5 V. Moreover, the noise equivalent power and the specific detectivity of the passivated Mg0.1Zn0.9O MSM-UPDs with antireflection layer were decreased to2.60×10-13 W and increased to1.21×1012 cmHz1/2W−1, respectively, at the bias voltage of 5 V. According to the above mentions, the PEC treatment and silica nanospheres antireflection layer could effectively enhance the performance of Mg0.1Zn0.9O MSM-UPDs.