Azoxy compounds are a distinctive group of bioactive secondary metabolites, characterized by a unique RN=N+(O-)R moiety. The azoxy moiety is present in various classes of metabolites that exhibit various biological activities. The enzymatic mechanisms underlying azoxy bond formation remain enigmatic. Azodyrecins are cytotoxic azoxy metabolites produced by Streptomyces mirabilis P8-A2. Here we cloned and confirmed the putative azd biosynthetic gene cluster through CATCH cloning followed by expression and production of azodyrecins in two heterologous hosts, S. albidoflavus J1074 and S. coelicolor M1146, respectively. We explored the function of 14 enzymes in azodyrecin biosynthesis through gene knock-out using CRISPR-Cas9 base editing in the native producer, S. mirabilis P8-A2. The key intermediates were analyzed in the mutants through MS/MS fragmentation studies, revealing azoxy bond formation via the conversion of hydrazine to azo compound; followed by further oxygenation. Additionally, N-oxygenase and dehydrogenase activities were confirmed among 8 core biosynthetic genes and five helper genes. Moreover, the distribution of the azoxy biosynthetic gene clusters across Streptomyces spp. genomes is explored, highlighting the presence of these clusters in over 20% of the Streptomyces spp. genomes and revealing that azoxymycin and valanimycin are scarce, while azodyrecin and KA57A like clusters are widely distributed across the phylogenetic tree.