Flavonoids are a diverse family of natural compounds that are widely distributed in plants and play a critical role in plant growth, development, and stress adaptation. In recent years, the biosynthesis of flavonoids in plants has been well-researched, with the successive discovery of key genes driving this process. However, the regulation of flavonoid biosynthesis in fungi remains unclear. Stropharia rugosoannulata is an edible mushroom known for its high nutritional and pharmacological value, with flavonoids being one of its main active components. To investigate the flavonoid content of S. rugosoannulata, a study was conducted to extract and determine the total flavonoids at four stages: young mushroom (Ym), gill (Gi), maturation (Ma), and parachute-opening (Po). The findings revealed a gradual increase in total flavonoid concentration as the fruiting body developed, with significant variations observed between the Ym, Gi, and Ma stages. Subsequently, we used UPLC-MS/MS and transcriptome sequencing (RNA-seq) to quantify the flavonoids and identify regulatory genes of Ym, Gi, and Ma. In total, 53 flavonoid-related metabolites and 6726 differentially expressed genes (DEGs) were identified. Through KEGG pathway enrichment analysis, we identified 59 structural genes encoding flavonoid biosynthesis-related enzymes, most of which were up-regulated during the development of the fruiting body, consistent with the accumulation of flavonoids. This research led to the establishment of a comprehensive transcriptional metabolic regulatory network encompassing flavonoids, flavonoid synthases, and transcription factors (TFs). This represents the first systematic exploration of the molecular mechanism of flavonoids in the fruiting of fungi, offering a foundation for further research on flavonoid mechanisms and the breeding of high-quality S. rugosoannulata.