Two-dimensional (2D) materials have attracted significant attention as a promising candidate for electronic and optoelectronic devices. However, low absorption impairs the performance of few-layer 2D material-based photodetectors (PDs). Herein, we purpose an asymmetric Fabry-Perot cavity consisting of a dielectric layer and metallic film to enhance the interactions between light and monolayer molybdenum disulfide (MoS2). The external quantum efficiency of the monolayer MoS2 heterojunction PD is enhanced by more than two orders of magnitude via optimizing the thickness of the dielectric layer. The monolayer-MoS2/nickel oxide heterojunction PD exhibits a large on/off ratio of 2 × 105, a responsivity of 703 A W−1, and an ultrahigh detectivity of 1.31 × 1015 Jones. The detectivity is the best value ever reported for monolayer-MoS2 heterojunction PDs. Our results may pave the way for high-performance 2D material-based PDs.