Provided herein are compounds and methods of synthesis thereof. The compounds provided herein are useful for the treatment, prevention, and/or management of various disorders, such as pain, neurological disorders, psychiatric disorders, and neuromuscular disorders. Compounds provided herein modulate the activity of opioid receptor (e.g., µ-opioid receptor) in the central nervous system or the periphery. Pharmaceutical formulations containing the compounds and their methods of use are also provided herein.