The catalyst-free molecular beam epitaxial growth of GaN nanowires and their heterostructures on a SiOx template is studied in detail. It was found that by optimizing the growth temperature, highly uniform and vertically aligned GaN nanowires and InGaN/GaN heterostructures with excellent optical properties can be obtained on a SiOx template in a large-scale. This work provides an entirely new avenue for GaN nanowire based optoelectronic devices.