Trace amine-associated receptors (TAARs), a group of biogenic amine receptors, play pivotal roles in neurological and metabolic homeostasis1. They recognize diverse endogenous trace amines (ETAs) and subsequently activate a range of G protein subtype signaling pathways2,3. Notably, TAAR1 has emerged as a promising therapeutic target for treating psychiatric disorders4,5. However, the molecular mechanisms underlying its ability to recognize different ligands remain largely elusive. Here, we present nine cryo-electron microscopy (EM) structures, with eight showing human and mouse TAAR1 in complex with an array of ligands, including the endogenous 3-iodothyronamine, two antipsychotic agents, the psychoactive drug amphetamine, and two identified catecholamine agonists, and one depicting 5-HT1AR in complex with an antipsychotic agent. These structures reveal a rigid consensus binding motif in TAAR1 that binds to ETAs stimuli and two extended binding pockets that accommodate diverse chemotypes. Combined with mutational analysis, functional assays and molecular dynamic simulations, we elucidate the structural basis of drug polypharmacology and identify the species-specific differences between human and mouse TAAR1. Our study provides insights into the mechanism of ligand recognition and G protein selectivity by TAAR1, which may aid the discovery of ligands or therapeutic strategies for neurological and metabolic disorders.