Plants contain a vast array of natural products yet to be discovered, particularly those minor bioactive constituents. Identification of these constituents requires a significant amount of plant material, presenting considerable technical challenges. Mugwort (Artemisia argyi) is a widely recognized insect repellent herb, particularly renowned for its extensive usage during the Dragon Boat Festival in China, but the specific constituent responsible for its repellent activity remains unknown. Here, we employed a gene-directed in vitro mining approach to characterize mugwort terpene synthases (TPSs) systematically in a yeast expression system. Based on the establishment of "Terpene synthase-standard library", we have successfully identified 54 terpene products, including a novel compound designated as cyclosantalol. Through activity screening, we have identified that (+)-intermedeol, which presents in trace amount in plants, exhibits significant repellent activity against mosquitoes and ticks. After establishing its safety and efficacy, we then achieved its biosynthetic production in a yeast chassis, with an initial yield of 2.34 g/L. The methodology employed in this study not only identified a highly effective, safe, and commercially viable insect repellent derived from mugwort but also holds promise for uncovering and producing other valuable plant natural products in future research endeavors.