Mas-related G-protein-coupled receptors X1-X4 (MRGPRX1-X4) are four primate-specific receptors that are recently reported to be responsible for many biological processes, including itch sensation, pain transmission, and inflammatory reactions. MRGPRX1 is the first identified human MRGPR, and its expression is restricted to primary sensory neurons. Due to its dual roles in itch and pain signaling pathways, MRGPRX1 has been regarded as a promising target for itch remission and pain inhibition. Here, we reported a cryo-electron microscopy (cryo-EM) structure of Gq-coupled MRGPRX1 in complex with a synthetic agonist compound 16 in an active conformation at an overall resolution of 3.0 angstrom via a NanoBiT tethering strategy. Compound 16 is a new pain-relieving compound with high potency and selectivity to MRGPRX1 over opioid receptor. According to the structure analysis, we revealed that MRGPRX1 shares common features of the Gq-mediated receptor activation mechanism of MRGPRX family members. However, the variable residues in orthosteric pocket of MRGPRX1 exhibits the unique agonist recognition pattern, which may facilitate to design MRGPRX1-specific modulators. Together with receptor activation and itch behavior evaluation assays, our study provides a structural snapshot to modify therapeutic molecules for itch relieving and analgesia targeting MRGPRX1.