Patients with cholestatic disease exhibit pruritus and analgesia, but the mechanisms underlying these symptoms are unknown. We report that bile acids, which are elevated in the circulation and tissues during cholestasis, cause itch and analgesia by activating the GPCR TGR5. TGR5 was detected in peptidergic neurons of mouse dorsal root ganglia and spinal cord that transmit itch and pain, and in dermal macrophages that contain opioids. Bile acids and a TGR5-selective agonist induced hyperexcitability of dorsal root ganglia neurons and stimulated the release of the itch and analgesia transmitters gastrin-releasing peptide and leucineenkephalin. Intradermal injection of bile acids and a TGR5-selective agonist stimulated scratching behavior by gastrin-releasing peptide- and opioid-dependent mechanisms in mice. Scratching was attenuated in Tgr5-KO mice but exacerbated in Tgr5-Tg mice (overexpressing mouse TGR5), which exhibited spontaneous pruritus. Intraplantar and intrathecal injection of bile acids caused analgesia to mechanical stimulation of the paw by an opioid-dependent mechanism. Both peripheral and central mechanisms of analgesia were absent from Tgr5-KO mice. Thus, bile acids activate TGR5 on sensory nerves, stimulating the release of neuropeptides in the spinal cord that transmit itch and analgesia. These mechanisms could contribute to pruritus and painless jaundice that occur during cholestatic liver diseases.