An ultraviolet photodetector was fabricated based on Mg0.07Zn0.93O heterojunction. N, N'-bis (naphthalen-1-y1)-N, N'-bis(pheny) benzidine was selected as the hole transporting layer. I-V characteristic curves of the device were measured in the dark and under the illumination of 340 nm UV light with density of 1.33 mW/cm2. The device showed a low dark current of about 3×10(-10) A and a high photo-dark current ratio of 1×10(5) at -2 V bias. A narrowband photoresponse was observed from 300 to 400 nm and centered at 340 nm with a full width at half-maximum of only 30 nm. The maximum peak response is at 340 nm, which is 0.192 A/W at the bias of -1 V.