Abstract 2D transition metal dichalcogenides (TMDs) materials with inherent flexibility, transparency, and sizable bandgap have gained significant attention as promising candidates for future semiconductor nanodevices. However, complementary doping in these 2D semiconductors remains a challenge because conventional ion implantation can lead to permanent damage to the atomically thin 2D channels. Here, programmable WSe 2 2D lateral p‐n homojunction controlled by dual floating gates on a SiO 2 /Si substrate, achieving a rectification ratio of ≈10 5 and three dynamically switchable current levels is demonstrated. By injecting charges into two floating gates by applying voltage pulses with different polarities, lateral p‐n, n‐p, n‐n, p‐p homojunction can be formed. The ideality factors for the p‐n and n‐p junctions are extracted as ≈1.56 and ≈1.57, respectively. The WSe 2 p‐n homojunction shows a maximum photovoltage responsivity of 6.67 × 10 9 V W −1 under a weak light power of 0.09 nW. These results demonstrate outstanding electrical and optoelectronic properties in the programmable 2D lateral p‐n junctions, establishing a solid foundation for the development of future non‐volatile reconfigurable devices.