Abstract Narrowband photodetection provides important information in a specific wavelength range. Specially, the use of nonoptical‐filter narrowband photodetectors based on MAPbX 3 (MA = CH 3 NH 3 ; X = Cl, Br, I) perovskites is reported of great potential. However, current MAPbX 3 ‐based narrowband photodetectors have to sacrifice their photocurrent and response speed to achieve an acceptable spectral rejection ratio. In this work, a new type of heterojunction photodetector (hetero‐PD) with a structure of (n‐type doped MAPbCl 3 )/(intrinsic MAPbBr 2.5 Cl 0.5 )/(n‐type doped MAPbBr 3 ) via epitaxial growth is demonstrated as a narrowband photodetector. Through optical bandgap engineering, photons with different wavelength can be absorbed in different layers. Owing to the n–i–n energy band structure, most external bias would apply on a tiny region near the n–i heterojunction. Besides, the energy barriers in the heterojunctions can block holes from injection and collection, resulting in low‐noise electron‐only hetero‐PDs. By sufficiently suppressing the background noise from short‐wavelength photons, hetero‐PDs are capable of achieving a high spectral rejection ratio of 98.1% under an electrical field of 8 V cm −1 . Moreover, hetero‐PDs exhibit a high external quantum efficiency value of 45%, a narrow full width at half‐maximum of 13 nm, and a response time of 1.35 µs.