We have realized a light-emitting organic field-effect transistor (LEOFET). Excitons are generated at the interface of an n-type and a p-type organic semiconductor heterostructure inside the transistor channel. The dimensions and the position of the p-n heterostructure are defined by photolithography. The recombination region is several microns from the metal electrodes. Therefore, the exciton quenching probability in this device is reduced. Numerical simulations show that the recombination region can move within the transistor channel by changing the biasing conditions.