Macrolactins (MLNs) have unique structural patterns containing a 24-membered ring lactone and diverse bioactivities. The MLN skeleton is biosynthesized via a trans-acyl transferase (AT) type I polyketide synthase (PKS) pathway, but the tailoring steps are still unknown. Herein, we report the identification of a glycosyltransferase (GT) gene bmmGT1, which is located at different locus from the MLN gene cluster in the genome of marine-derived Bacillus marinus B-9987, and its functional characterization as an MLN GT, thus affording five novel MLNs analogues. Surprisingly, this GT is also capable of catalyzing the glycosylation of bacillaenes (BAEs), which are the prototypes of trans-AT polyketides, thus suggesting broad substrate flexibility. These results provide the first significant insights into the glycosylation step in MLN and BAE biosynthetic pathways.