Self-catalyzed growth of axial InxGa1-xAs/GaAs heterostructures has been realized by molecular beam epitaxy. The growth of the wires is achieved from gallium/indium alloy droplets that are nucleated in situ. By variation of the In/Ga beam flux during the growth it was possible to vary the effective indium content up to x = 5%, as deduced from photoluminescence measurements. We have analyzed the dependence of the alloy concentration on the growth conditions and present a simple model for the growth. The heterostructures grown with the method presented were spatially mapped along the wires with confocal microphotoluminescence and cathodoluminescence. It was found as expected that the emission of GaAs/InxGa1-xAs/GaAs heterostructures is localized. This work is important for the use of an external catalyst-free growth of complex axial heterostructures and related opto-electronic devices that facilitates its possible integration in the device or system fabrication processes.