Porous ZnO nanowires were obtained in an inexpensive and simple way by thermally oxidizing ZnSe nanowires in air. The morphologies of the precursor and resulted nanowires are almost identical. X-ray diffraction and energy-dispersive X-ray spectroscopy reveal that the zinc blende ZnSe nanowires were transformed into wurtzite ZnO nanowires after oxidation. Transmission electron microscope measurements indicate that the ZnO nanowires are polycrystalline and are composed of nanoparticles and nanopores. ZnCdO nanowires, which were seldom reported previously, have also been prepared in this way. Just like the ZnO nanowires, the ZnCdO nanowires also show the porous structure. Photoluminescence studies on both ZnO and ZnCdO nanowires show intense near-band edge emissions at room temperature. The transition from one kind of nanowires to another by simple thermal oxidization described in this paper may be applicable to some other compound semiconductors and may open a practical route to yield nanowires.