Stable p-i-n junction was formed in polymer thin films by a facile electrochemical method. The polymer thin films contained an alkoxyphenyl substituted poly(1,4-phenylene vinylene), a cross-linkable liquid trimethylolpropane trimethacrylate (TMPTMA), and lithium trifluoromethane sulfonate at a weight ratio of 20:10:1. The thin films were sandwiched between an indium tin oxide anode and an aluminum cathode. During initial charging at 12 V, a p-i-n junction was formed in a similar fashion as reported in the polymer light-emitting electrochemical cells except that the junction did not relax during subsequent idling without external bias. TMPTMA was responsible in conducting the ions (dopants) during the formation of the junction. The junction stabilized as TMPTMA cured and lost its ionic conductivity. This mechanism is supported by the measurements of the electroluminescence behavior, the photovoltaic response and the AC impedance of the charged devices. The formation of the stable p-i-n junction improves the electroluminescence performance and photovoltaic efficiency compared to similar devices without such a junction. The polymer p-i-n junction devices exhibited current-voltage response characteristic of light-emitting diodes with turn-on time<5 mS. The luminance efficiency was 3.0 cd/A, and brightness was 450 Cd/m2 at 10 V. The same junction devices under 100 mW/cm(-2) AM1.5 solar illumination had an open-circuit voltage of 1.5 V and a short circuit current of 6 microA/cm2 with an over 460% enhancement on efficiency compared to the device without the junction.