Well-aligned ZnO nanowires have been prepared on sapphire substrate, and structural and optical characterizations indicate that the nanowires are of single crystalline and have relatively high luminescent quality. By employing the ZnO nanowires as an active layer, p-Zn0.68Mg0.32O:N/n-ZnO nanowire he