Deep eutectic solvents (DESs) are increasingly receiving interest as a new type of green and sustainable alternative to hazardous organic solvents. In this work, a novel DES based on levulinic acid (La) and 1,4-butanediol (Buta) as an extraction media was developed for extracting the bioactive alkaloid rutaecarpine from the unripe fruits of Tetradium ruticarpum. 24 different DESs consisting of choline chloride, betaine, sugar alcohols, organic acids, amides, and sugars were prepared and tailored to test their extraction efficiency. After initial screening, a hydrophilic DES composed of La and Buta with 1:0.5 molar ratio containing 25% water was tailored for the highest extraction efficiency, followed by the optimizations of molar ratio and water content. The interaction between the molecules of La-Buta DES was investigated by nuclear magnetic resonance spectroscopy in order to confirm its deep eutectic supermolecular structure feature. The extraction conditions were optimized by single-factor experiments, including extraction temperature, extraction time, and solid-liquid ratio. The developed La-Buta DES extraction procedure was successfully applied for the analysis of rutaecarpine in Chinese patent medicines containing the unripe fruits of T. ruticarpum. The excellent property of La-Buta DES indicated its potential as a promising green solvent instead of conventional organic solvent for the extraction of rutaecarpine from the unripe fruits of T. ruticarpum, and that it can used as a sustainable and safe extraction media for other applications.