High quality p–n junctions based on 2D layered materials (2DLMs) are urgent to exploit, because of their unique properties such as flexibility, high absorption, and high tunability which may be utilized in next‐generation photovoltaic devices. Based on transfer technology, large amounts of vertical heterojunctions based on 2DLMs are investigated. However, the complicated fabrication process and the inevitable defects at the interfaces greatly limit their application prospects. Here, an in‐plane intramolecular WSe2 p–n junction is realized, in which the n‐type region and p‐type region are chemically doped by polyethyleneimine and electrically doped by the back‐gate, respectively. An ideal factor of 1.66 is achieved, proving the high quality of the p–n junction realized by this method. As a photovoltaic detector, the device possesses a responsivity of 80 mA W−1 (≈20% external quantum efficiency), a specific detectivity of over 1011 Jones and fast response features (200 µs rising time and 16 µs falling time) at zero bias, simultaneously. Moreover, a large open‐circuit voltage of 0.38 V and an external power conversion efficiency of ≈1.4% realized by the device also promises its potential in microcell applications.