G protein-coupled receptors for dopamine and serotonin control signaling pathways targeted by many psychoactive drugs. A puzzle is how receptors with similar functions and nearly identical binding site structures, such as D2 dopamine receptors and 5-HT2A serotonin receptors, could evolve a mechanism that discriminates stringently in their cellular responses between endogenous neurotransmitters. We used the Difference Evolutionary Trace (Difference-ET) and residue-swapping to uncover two distinct sets of specificity-determining sequence positions. One at the ligand-binding pocket determines the relative affinities for these two ligands, and a distinct, surprising set of positions outside the binding site determines whether a bound ligand can trigger the conformational rearrangement leading to G protein activation. Thus one site specifies affinity while the other encodes a filter for efficacy. These findings demonstrate that allosteric pathways linking distant interactions via alternate conformational states enforce specificity independently of the ligand-binding site, such that either one may be rationally rekeyed to different ligands. The conversion of a dopamine receptor effectively into a serotonin receptor illustrates the plasticity of GPCR signaling during evolution, or in pathological states, and suggests new approaches to drug discovery, targeting both classes of sites.