Hydroxycarboxylic acid receptor 2 (HCAR2) belongs to the family of class A G protein-coupled receptors with key roles in regulating lipolysis and free fatty acid formation in humans. It is deeply involved in many pathophysiological processes and serves as an attractive target for the treatment of cardiovascular, neoplastic, autoimmune, neurodegenerative, inflammatory, and metabolic diseases. Here, we report four cryo-EM structures of human HCAR2–Gi1 complexes with or without agonists, including the drugs niacin (2.69 Å) and acipimox (3.23 Å), the highly subtype-specific agonist MK-6892 (3.25 Å), and apo form (3.28 Å). Combined with molecular dynamics simulation and functional analysis, we have revealed the recognition mechanism of HCAR2 for different agonists and summarized the general pharmacophore features of HCAR2 agonists, which are based on three key residues R1113.36, S17945.52, and Y2847.43. Notably, the MK-6892–HCAR2 structure shows an extended binding pocket relative to other agonist-bound HCAR2 complexes. In addition, the key residues that determine the ligand selectivity between the HCAR2 and HCAR3 are also illuminated. Our findings provide structural insights into the ligand recognition, selectivity, activation, and G protein coupling mechanism of HCAR2, which shed light on the design of new HCAR2-targeting drugs for greater efficacy, higher selectivity, and fewer or no side effects.