The photodetectors are critical elements in state-of-the-art technology; however, it is still challenging to realize simultaneously high detectivity and responsivity for the fixed operation mode configuration. In this work, we propose a pn junction local-floating gate photodetector (PNLFG-PD) based on a two-dimensional p-WSe2/n-MoS2 heterojunction, where n-type MoS2 is partly floated on the p-WSe2 channel. The device exhibits the switchable mode between the Λ-shaped anti-ambipolar conduction in dark and the unipolarity conduction of p-type under illumination. Subsequently, the high responsivity of 2.12×105 A/W and detectivity of 1.25×1014 Jones are simultaneously obtained at 2 V bias and 405 nm illumination of 370 μW light power, resulting in high light/dark ratio over 106 attributed to barrier lowering in the channel. This work provides a particular platform to overcome the tradeoff between detectivity and responsivity for the high-performance photodetection.