A kappa opioid receptor binding inhibitor was isolated from the fermentation broth of a basidiomycete, Hericium ramosum CL24240 and identified as erinacine E (1). Three analogs of 1 were produced by fermentation in other media and by microbial biotransformation. Of these compounds, 1 was shown to be the most potent binding inhibitor. Preliminary SAR studies of these compounds indicated that all functional groups and side chains were required for the activity. Compound 1 was a highly-selective binding inhibitor for the kappa opioid receptor: 0.8 mu M (IC50) for kappa, > 200 mu M for mu, and > 200 mu M for delta opioid receptor. Compound 1 suppressed electrically-stimulated twitch responses of rabbit vas deferens with an ED50 of 14 mu M. The suppression was recovered adding a selective kappa opioid receptor antagonist nor-binaltorphimine, indicating that 1 is a kappa opioid receptor agonist.