Interface engineering of the hole transport layer in CH3NH3PbI3photodetectors has resulted in significantly increased carrier accumulation and dark current as well as energy band mismatch, thus achieving the goal of high-power conversion efficiency. However, the reported heterojunction perovskite photodetectors exhibit high dark currents and low responsivities. Herein, heterojunction self-powered photodetectors, composed of p-type CH3NH3PbI3and n-type Mg0.2Zn0.8O, are prepared through the spin coating and magnetron sputtering. The obtained heterojunctions exhibit a high responsivity of 0.58 A/W, and the EQE of the CH3NH3PbI3/Au/Mg0.2Zn0.8O heterojunction self-powered photodetectors is 10.23 times that of the CH3NH3PbI3/Au photodetectors and 84.51 times that of the Mg0.2ZnO0.8/Au photodetectors. The built-in electric field of the p-n heterojunction significantly suppresses the dark current and improves the responsivity. Remarkably, in the self-supply voltage detection mode, the heterojunction achieves a high responsivity of up to 1.1 mA/W. The dark current of the CH3NH3PbI3/Au/Mg0.2Zn0.8O heterojunction self-powered photodetectors is less than 1.4 × 10−1pA at 0 V, which is more than 10 times lower than that of the CH3NH3PbI3photodetectors. The best value of the detectivity is as high as 4.7 × 1012Jones. Furthermore, the heterojunction self-powered photodetectors exhibit a uniform photodetection response over a wide spectral range from 200 to 850 nm. This work provides guidance for achieving a low dark current and high detectivity for perovskite photodetectors.