Nanoscale variations in the composition of an AlxGa1−xAs shell around a GaAs nanowire affect the nanowire functionality and can lead to the formation of localized quantum emitters. These composition fluctuations can be the consequence of variations of crystal phase and/or nanoscale adatom mobility.By applying electron microscopy related techniques we correlate the optical, compositional and structural properties at the nanoscale on the same object. The results indicate a clear correlation between the twin density in the nanowire and the quantum-emitter density as well as a significant redshift in the emission. We propose that twinning increases nanoscale segregation effects in ternary alloys. An additional redshift in the emission can be explained by the staggered band-alignment between wurtzite and zinc-blende phases. This work opens new avenues in the achievement of homogeneous ternary and quaternary alloys in nanowires and in the engineering of the segregation effects at the nanoscale.