Aspergillus flavus is notorious for contaminating food with its secondary metabolite-highly carcinogenic aflatoxins. In this study, we found that exogenous nitric oxide (NO) donor could influence aflatoxin production in A. flavus. Flavohemoglobins (FHbs) are vital functional units in maintaining nitric oxide (NO) homeostasis and are crucial for normal cell function. To investigate whether endogenous NO changes affect aflatoxin biosynthesis, two FHbs, FHbA and FHbB, were identified in this study. FHbA was confirmed as the main protein to maintain NO homeostasis, as its absence led to a significant increase in intracellular NO levels and heightened sensitivity to SNP stress. Dramatically, FHbA deletion retarded aflatoxin production. In addition, FHbA played important roles in mycelial growth, conidial germination, and sclerotial development, and response to oxidative stress and high-temperature stress. Although FHbB did not significantly impact the cellular NO level, it was also involved in sclerotial development, aflatoxin synthesis, and stress response. Our findings provide a new perspective for studying the regulatory mechanism of the development and secondary mechanism in A. flavus.