Buckwheat is a famous edible and medicinal coarse cereal which contain abundant of bioactive flavonoids, such as rutin. In this study, the composition and diversity of endophytic fungi in eight different buckwheat seeds were analyzed by high-throughput sequencing of ITS rDNA. Results showed that, the fungal sequences reads were allocated to 272 OTUs, of them, 49 OTUs were shared in eight buckwheat seeds. These endophytic fungi could be classified into 6 phyla, 19 classes, 41 orders, 79 families, 119 genera, and 191 species. At genus level, Alternaria sp. was the domain fungal endophyte. Besides, fungal endophytes belonged to the genera of Epicocum, Cladosporium, Botrytis, Filbobasidium, Stemphylium, and Vishniacozyma were highly abundant in buckwheat seeds. The total flavonoids and rutin contents in tartary buckwheat cultivars (CQ, XQ, CH, K2) were much higher than those in common buckwheat cultivars (HT, T2, T4, T8). For tartary buckwheat cultivars, the total flavonoids and rutin contents were ranging from 2.6% to 3.3% and 0.9% to 1.3%, respectively. Accordingly, the tartary buckwheat samples displayed stronger antioxidant activity than the common buckwheat. Spearman correlation heat map analysis was successfully found that certain fungal species from the genera of Alternaria, Botryosphaeria, Colletorichum and Diymella exhibited significant positive correlation with flavonoids contents. Results of this study preliminary revealed the fungi-plant interaction relationship at secondary metabolite level, and could provide novel strategy for increasing the flavonoids accumulation of buckwheat seeds, as well as improving their quality.