It has recently been reported that the synaptic acetylcholinesterase (AChE) in mosquitoes is encoded by the ace-1 gene, distinct and divergent from the ace-2 gene, which performs this function in Drosophila. This is an unprecedented situation within the Diptera order because both ace genes derive from an old duplication and are present in most insects and arthropods. Nevertheless, Drosophila possesses only the ace-2 gene. Thus, a secondary loss occurred during the evolution of Diptera, implying a vital function switch from one gene (ace-1) to the other (ace-2). We sampled 78 species, representing 50 families (27% of the Dipteran families) spread over all major subdivisions of the Diptera, and looked for ace-1 and ace-2 by systematic PCR screening to determine which taxonomic groups within the Diptera have this gene change. We show that this loss probably extends to all true flies (or Cyclorrhapha), a large monophyletic group of the Diptera. We also show that ace-2 plays a non-detectable role in the synaptic AChE in a lower Diptera species, suggesting that it has non-synaptic functions. A relative molecular evolution rate test showed that the intensity of purifying selection on ace-2 sequences is constant across the Diptera, irrespective of the presence or absence of ace-1, confirming the evolutionary importance of non-synaptic functions for this gene. We discuss the evolutionary scenarios for the takeover of ace-2 and the loss of ace-1, taking into account our limited knowledge of non-synaptic functions of ace genes and some specific adaptations of true flies.