Aspergillus flavus and its carcinogenic secondary metabolites, aflatoxins, not only cause serious losses in the agricultural economy, but also endanger human health. Rhein, a compound extracted from the Chinese herbal medicine Rheum palmatum L. (Dahuang), exhibits good anti-inflammatory, anti-tumor, and anti-oxidative effects. However, its effect and underlying mechanisms against Aspergillus flavus have not yet been fully illustrated. In this study, we characterized the inhibition effect of rhein on A. flavus mycelial growth, sporulation, and aflatoxin B1 (AFB1) biosynthesis and the potential mechanism using RNA-seq analysis. The results indicate that A. flavus mycelial growth and AFB1 biosynthesis were significantly inhibited by 50 μM rhein, with a 43.83% reduction in colony diameter and 87.2% reduction in AFB1 production. The RNA-seq findings demonstrated that the differentially expressed genes primarily participated in processes such as spore formation and development, the maintenance of cell wall and membrane integrity, management of oxidative stress, the regulation of the citric acid cycle, and the biosynthesis of aflatoxin. Biochemical verification experiments further confirmed that 50 μM rhein effectively disrupted cell wall and membrane integrity and caused mitochondrial dysfunction through disrupting energy metabolism pathways, leading to decreased ATP synthesis and ROS accumulation, resulting in impaired aflatoxin biosynthesis. In addition, a pathogenicity test showed that 50 μM rhein inhibited A. flavus spore growth in peanut and maize seeds by 34.1% and 90.4%, while AFB1 biosynthesis was inhibited by 60.52% and 99.43%, respectively. In conclusion, this research expands the knowledge regarding the antifungal activity of rhein and provides a new strategy to mitigate A. flavus contamination.