The present study aimed to investigate the decolorization of various commercial dyes through bioinformatics analysis, utilizing techniques such as molecular docking, molecular dynamics simulation, and Molecular Mechanics Poisson-Boltzmann Surface Area (MMPBSA). These analyses were conducted on different commercial dyes to evaluate their potential for biodegradation. In this study, four commercial dyes, namely acid orange 7, cresol red, methylene blue, and malachite green, were selected as potential targets for degradation by azoreductases (AzrBmH21, AzrBmH22/3, and AzrBmH24/5) derived from Bacillus megaterium H2. The prediction of ligand binding or catalytic sites for AzrBmH21, AzrBmH22/3, and AzrBmH24/5 was performed using a machine learning algorithm based on the Prank Web and DeepSite chemoinformatic tool. The analysis revealed that several amino acids of AzrBmH2 interacted with the tested dyes, indicating the presence of distinct ligand-binding sites for AzrBmH2-dye complexes. The binding affinity for AzrBmH21, AzrBmH22/3, and AzrBmH24/5 ranged from − 9.4 to -5.5 kcal/mol, -9.2 to -5.4 kcal/mol, and − 9.0 to -5.4 kcal/mol, respectively. Each complex was stabilized by a minimum of 0–5 hydrogen bonds. MD simulations revealed stable AzrBmH2-dye complexes (with RMSD 0.15–0.42 nm, RMSF 0.05–0.48 nm, Rg 1.75–1.88 nm). MMPBSA calculations indicated that the AzrBmH2-dye complexes, except for AzrBmH2-malachite green, exhibited the lowest binding energy (-191.05 ± 7.08 to 314.19 ± 6.88 kcal/mol). The AzrBmH2-malachite green complex showed a prevalence of hydrophobic interactions (-268.25 ± 12.25 to -418.92 ± 29.45 kcal/mol) through van der Waals forces. This study highlights the potential role of enzymes, specifically azoreductases from Bacillus megaterium H2, in predicting the decolorization of commercial dyes. These findings contribute to our understanding of enzyme mechanisms in bioremediation and for biotechnological applications.