Bicyclomycin (BCM) is a clinically promising antibiotic that is biosynthesised by Streptomyces cinnamoneusDSM 41675. BCM is structurally characterized by a core cyclo(L-Ile-L-Leu) 2,5-diketopiperazine (DKP) that is extensively oxidized. Here, we identify the BCM biosynthetic gene cluster, which shows that the core of BCM is biosynthesised by a cyclodipeptide synthase and the oxidative modifications are introduced by five 2-oxoglutarate-dependent dioxygenases and one cytochrome P450 monooxygenase. The discovery of the gene cluster enabled the identification of BCM pathways encoded in the genomes of hundreds of Pseudomonas aeruginosa isolates distributed globally, and heterologous expression of the pathway from P. aeruginosa SCV20265 demonstrated that the product is chemically identical to BCM produced by S. cinnamoneus. Overall, putative BCM gene clusters have been found in at least seven genera spanning Actinobacteria and Proteobacteria (Alpha-, Beta- and Gamma-). This represents a rare example of horizontal gene transfer of an intact biosynthetic gene cluster across such distantly related bacteria, and we show that these gene clusters are almost always associated with mobile genetic elements.