The pea aphid genome was recently found to harbor genes for carotenoid biosynthesis, reflecting an ancestral transfer from a fungus. To explore the evolution of the carotene desaturase gene family within aphids, sequences were retrieved from a set of 34 aphid species representing numerous deeply diverging lineages of aphids and analyzed together with fungal sequences retrieved from databases. All aphids have at least one copy of this gene and some aphid species have up to seven, whereas fungal genomes consistently have a single copy. The closest relatives of aphids, adelgids, also have carotene desaturase; these sequences are most closely related to those from aphids, supporting a shared origin from a fungal to insect transfer predating the divergence of adelgids and aphids. Likewise, all aphids, and adelgids, have carotenoid profiles that are consistent with their biosynthesis using the acquired genes of fungal origin rather than derivation from food plants. The carotene desaturase was acquired from a fungal species outside of Ascomycota or Basidiomycota and closest to Mucoromycotina among sequences available in databases. In aphids, an ongoing pattern of gene duplication is indicated by the presence of both anciently and recently diverged paralogs within genomes and by the presence of a high frequency of pseudogenes that appear to be recently inactivated. Recombination among paralogs is evident, making analyses of patterns of selection difficult, but tests of selection for a nonrecombining region indicates that duplications tend to be followed by bouts of positive selection. Species of Macrosiphini, which often show color polymorphisms, typically have a larger number of desaturase copies relative to other species sampled in the study. These results indicate that aphid evolution has been accompanied by ongoing evolution of carotenogenic genes, which have undergone duplication, recombination, and occasional positive selection to yield a wide variety of carotenoid profiles in different aphid species.