Unrelated genes establish head-to-tail polarity in embryos of different fly species, raising the question of how they evolve this function. We show that in moth flies (Clogmia, Lutzomyia), a maternal transcript isoform of odd-paired (Zic) is localized in the anterior egg and adopted the role of anterior determinant without essential protein change. Additionally, Clogmia lost maternal germ plasm, which contributes to embryo polarity in fruit flies (Drosophila). In culicine (Culex, Aedes) and anopheline mosquitoes (Anopheles), embryo polarity rests on a previously unnamed zinc finger gene (cucoid), or pangolin (dTcf), respectively. These genes also localize an alternative transcript isoform at the anterior egg pole. Basal-branching crane flies (Nephrotoma) also enrich maternal pangolin transcript at the anterior egg pole, suggesting that pangolin functioned as ancestral axis determinant in flies. In conclusion, flies evolved an unexpected diversity of anterior determinants, and alternative transcript isoforms with distinct expression can adopt fundamentally distinct developmental roles.