An intriguing structural feature of echinocandins is the incorporation of hydroxylated amino acids. Elucidation of the machinery and themechanism responsible for this modification is critical to generate new echinocandin derivativeswith enhanced antifungal activity. In our present study, we biochemically characterized the alpha-ketoglutarate/Fe2+-dependent proline hydroxylase (HtyE) from two Aspergillus species, Aspergillus pachycristatus and Aspergillus aculeatus, in the respective echinocandin B and aculeacin A biosynthetic gene clusters. Our results showed that both Ap-and Aa-HtyE converted L-proline to trans-4- and trans-3-hydroxyproline, but at different ratios. Both enzymes also effectively hydroxylated C-3 of 4R-methyl-proline, L-pipecolic acid, and D-proline. Our homology modeling and site-directed mutagenesis studies identified Leu182 of Ap-HtyE as a key residue in determining the regioselectivity of Ap-HtyE. Notably, we found that the efficiency in C-3 hydroxylation of 4R-methyl-proline has no direct correlation with the ratio of trans-4-hydroxylproline to trans-3-hydroxylproline catalyzed by HtyE. Deletion of Ap-htyE abolished A. pachycristatus anti-Candida activity and the production of echinocandin B, demonstrating that HtyE is the enzyme responsible for the hydroxylation of L-proline and 4R-methyl-proline in vivo and is essential for the anti-Candida activity of echinocandin B. Our present study thus sheds light on the biochemical basis for the selective hydroxylation of L-proline and 4R-methyl-proline and reveals a new type of biocatalyst with potential for the custom production of hydroxylated proline and pipecolic acid derivatives.