The heterotrimeric G protein-coupled serotonin receptor 5-HT1A receptor (5-HT1AR) mediates antinociception and may serve as a valuable target for the treatment of pain. Starting from a chemical library, we evolved ST171, a bitopic 5-HT1AR agonist that revealed highly potent and functionally selective Gi/o signaling without Gs activation and marginal β-arrestin recruitment. ST171 is effective in acute and chronic pain models. Cryo-electron microscopy structures of ST171 bound to 5-HT1AR in complex with the Gi protein compared to the canonical agonist befiradol bound to complexes of 5-HT1AR with Gi or Gs revealed that the ligands occupy different exo-sites. The individual binding poses are associated with ligand-specific receptor conformations that were further studied by molecular dynamics simulations, allowing us to better understand ligand bias, a phenomenon that may be crucial to the discovery of more effective and safe G protein-coupled receptor drugs.