Internally mildewed sunflower seeds pose a significant risk to human health. To control internal mildew, it is imperative to study its source in the main production area of China, which has been little investigated. Here, high-throughput sequencing was used to characterize the fungal and fungus-seed communities. Alpha diversity and ANOSIM analyses showed mildew did not alter the fungal compositions significantly. STAMP analysis showed that the sunflower seeds were most vulnerable to internal mildew during the field-planting stage. Alternaria was the predominant mildew-causing pathogen of sunflower seeds for consumption, which may originate from seed transmission and colonize at the seed-development stage. Finally, only a few seeds developed internal mildew with a worrisome level of Alternaria contamination in the humid field climate. NMDS analysis showed that climatic factors also played important roles in shaping microbial change during storage, with a relative humidity (RH) of 67% being the critical threshold in normal-temperature warehouses. Internal mildew never occurred below the RH threshold for the microbial community structure, which hardly changed after an average storage duration. The results indicated that a combination of field management to combat Alternaria, pretreatment with 5 KGy γ-irradiation and drying at the time of storage will minimize or prevent internal mildew. This work also provides an empirical framework for studies of mildewing in other shelled seeds.