In this paper, we have prepared Schottky type ZnO metal–semiconductor–metal (MSM) ultraviolet (UV) detector. The structural, electrical, and optical measurements were carried out. The detector exhibited a peak responsivity of 0.337A/W at 360nm and the dark current was about 1nA under 3V bias. An ultraviolet–visible rejection ratio was obtained about more than four orders of magnitude from the fabricated detector. The 10–90% rise and fall time were 20ns and 250ns, respectively. We proposed that the detector had shown a gain, which was attributed to the trapping of hole carriers at the semiconductor–metal interface.