Static p–n junctions in inorganic semiconductors are exploited in a wide range of today’s electronic appliances. Here, we demonstrate the in situ formation of a dynamic p–n junction structure within an organic semiconductor through electrochemistry. Specifically, we use scanning kelvin probe microscopy and optical probing on planar light-emitting electrochemical cells (LECs) with a mixture of a conjugated polymer and an electrolyte connecting two electrodes separated by 120 μm. We find that a significant portion of the potential drop between the electrodes coincides with the location of a thin and distinct light-emission zone positioned >30 μm away from the negative electrode. These results are relevant in the context of a long-standing scientific debate, as they prove that electrochemical doping can take place in LECs. Moreover, a study on the doping formation and dissipation kinetics provides interesting detail regarding the electronic structure and stability of the dynamic organic p–n junction, which may be useful in future dynamic p–n junction-based devices. The light-emitting electrochemical cell (LEC) is one application of organic semiconductors. Scanning kelvin probe microscopy and light-emission data obtained from operational planar LECs provide insight into the devices. The measured electrostatic potential profiles confirm that there is in situ formation of a dynamic p–n junction in the organic semiconductor during operation.