The design of small molecules that inhibit disease-relevant proteins represents a longstanding challenge of medicinal chemistry. Here, we describe an approach for encoding this challenge-the inhibition of a human drug target-into a microbial host and using it to guide the discovery and biosynthesis of targeted, biologically active natural products. This approach identi ed two previously unknown terpenoid inhibitors of protein tyrosine phosphatase 1B (PTP1B), an elusive therapeutic target for the treatment of diabetes and cancer. Both inhibitors target an allosteric site, which confers unusual selectivity, and can inhibit PTP1B in living cells. A screen of 24 uncharacterized terpene synthases from a pool of 4,464 genes uncovered additional hits, demonstrating a scalable discovery approach, and the incorporation of different PTPs into the microbial host yielded alternative PTP-speci c detection systems. Findings illustrate the potential for using microbes to discover and build natural products that exhibit precisely de ned biochemical activities yet possess unanticipated structures and/or binding sites.