Some Drosophila Hox-complex members, including the segmentation gene fushi tarazu (Dm-ftz), have nonhomeotic functions. Characteristic expression in other arthropods supports an ancestral homeotic role for ftz, indicating that ftz function changed during arthropod evolution. Dm-Ftz segmentation function depends on interaction with ftz-F1 via an LXXLL motif and homeodomain N-terminal arm. Hox proteins interact with the cofactor Extradenticle (Exd) via their YPWM motif. Previously, we found that Dm-ftz mediates segmentation but not homeosis, whereas orthologs from grasshopper (Sg-ftz) and beetle (Tc-Ftz), both containing a YPWM motif, have homeotic function. Tc-Ftz, which unlike Sg-Ftz contains an LXXLL motif, displays stronger segmentation function than Sg-Ftz. Cofactor-interaction motifs were mutated in Dm-Ftz and Tc-Ftz and effects were evaluated in Drosophila to assess how these motifs contributed to Ftz evolution. Addition of YPWM to Dm-Ftz confers weak homeotic function, which is increased by simultaneous LXXLL mutation. LXXLL is required for strong segmentation function, which is unimpeded by the YPWM, suggesting that acquisition of LXXLL specialized Ftz for segmentation. Strengthening the Ftz/Ftz-F1 interaction led to degeneration of the YPWM and loss of homeotic activity. Thus, small changes in protein sequence can result in a qualitative switch in function during evolution.