Many organs are specified far from the location they occupy when functional, having to migrate long distances through the heterogeneous and dynamic environment of the early embryo. We study the formation of the main Drosophila endocrine organ, the ring gland, as a new model to investigate in vivo the genetic regulation of collective cell migration. The ring gland results from the fusion of three independent gland primordia that migrate from the head towards the anterior aorta as the embryo is experiencing major morphogenetic movements. To complete their long-range migration, the glands extend filopodia moving sequentially towards a nearby intermediate target and from there to more distal ones. Thus, the apparent long-range migration is composed of several short-range migratory steps that facilitate reaching the final destination. We find that the target tissues react to the gland's proximity by sending filopodia towards it. Our finding of a succession of independent migration stages is consistent with the stepwise evolution of ring gland assembly and fits with the observed gland locations found in extant crustaceans, basal insects and flies.