An electrically pumped ZnO homojunction random laser diode based on nitrogen-doped p-type ZnO nanowires is reported. Nitrogen-doped ZnO nanowires are grown on a ZnO thin film on a silicon substrate by chemical vapor deposition without using any metal catalyst. The p-type behavior is studied by output characteristics and transfer characteristic of the nanowire back-gated field-effect transistor, as well as low-temperature photoluminescence. The formation of the p–n junction is confirmed by the current–voltage characteristic and electron beam-induced current. The nanowire/thin-film p–n junction acts as random laser diode. The random lasing behavior is demonstrated by using both optical pumping and electrical pumping, with thresholds of 300 kW/cm2 and 40 mA, respectively. The angle-dependant electroluminescence of the device further proves the random lasing mechanism. An output power of 70 nW is measured at a drive current of 70 mA.