We report on the p- and n-dopability of the quaternary wide-gap II-VI compound ZnMgSeTe as a function of the Te and Mg content. The samples were grown by molecular beam epitaxy (MBE) with activated nitrogen and chlorine as dopants. p-concentrations between 10 1 8 and 10 2 0 cm - 3 are reached for Zn ( 1 - x )Mg x Se ( 1 - y )Te y with x < 0.2 and y > 0.25. Cl-doping levels are low for Te contents above 10%, but reasonable electron concentrations are achieved for Zn ( 1 - x )Mg x Se with x < 0.5. Based on these data, diodes of n-ZnMgSe with p-ZnMgSeTe were fabricated. The p-contacts to these diodes are ohmic and the electrical properties are superior to those of ZnSe based p-n junctions. The diodes show bright green electroluminescence at liquid nitrogen temperature, but so far only moderate electroluminescence at room temperature.