The development of light-emitting diodes with improved efficiency, spectral properties, compactness and integrability is important for lighting, display, optical interconnect, logic and sensor applications. Monolayer transition-metal dichalcogenides have recently emerged as interesting candidates for optoelectronic applications due to their unique optical properties. Electroluminescence has already been observed from monolayer MoS2 devices. However, the electroluminescence efficiency was low and the linewidth broad due both to the poor optical quality of the MoS2 and to ineffective contacts. Here, we report electroluminescence from lateral p-n junctions in monolayer WSe2 induced electrostatically using a thin boron nitride support as a dielectric layer with multiple metal gates beneath. This structure allows effective injection of electrons and holes, and, combined with the high optical quality of WSe2, yields bright electroluminescence with 1,000 times smaller injection current and 10 times smaller linewidth than in MoS2 (refs 17,18). Furthermore, by increasing the injection bias we can tune the electroluminescence between regimes of impurity-bound, charged and neutral excitons. This system has the required ingredients for new types of optoelectronic device, such as spin- and valley-polarized light-emitting diodes, on-chip lasers and two-dimensional electro-optic modulators.