Azo compounds have adverse effects on the environment and public health, requiring effective treatment methods. Advanced oxidation processes (AOPs) are promising but hindered due to their toxic byproducts and high energy demands. Here, we report the development of magnesium-induced microbial AOP facilitated by biogenic iron nanoparticles. The novel strain, Bacillus sp. YN-1, capable of degrading azo compounds, was first isolated and used to synthesize iron nanoparticles, facilitating a Fenton-like reaction. Magnesium was used as an electron donor, replacing hydrogen peroxide to generate reactive oxygen species (ROS), mainly superoxide radicals. The engineered Bacillus sp. YN-1 exhibited remarkable degradation efficiency for azo dyes, achieving the removal capacity of Acid Orange 7 (99.0 %), Congo Red (99.5 %), Evans Blue (99.9 %), and Tartrazine (98.8 %) within 3 h. This novel microbial AOP offers a sustainable and cost-effective solution to remediate water contaminated with azo compounds, addressing key environmental challenges.