Bird predation during seed maturation causes great loss to agricultural production. In this study, through GWAS analysis of a large-scale sorghum germplasm diversity panel, we identified that Tannin1, which encodes a WD40 protein functioning in the WD40/MYB/bHLH complex, controls bird feeding behavior in sorghum. Metabolic profiling analysis showed that a group of sorghum accessions preferred by birds contain mutated tan1-a/b alleles and accumulate significantly lower levels of anthocyanins and condensed tannin compounds. In contrast, a variety of aromatic and fatty acid-derived volatiles accumulate at significantly higher levels in these bird-preference accessions. We subsequently conducted both sparrow feeding and sparrow volatile attractant assays, which confirmed, respectively, the antifeedant and attractant functions of these differentially accumulated metabolites. In addition, the connection between the biosynthesis pathway of anthocyanin and proanthocyanidin and the pathway of fatty acid–derived volatile biosynthesis was demonstrated by discovering that Tannin1 complex modulates fatty acid biosynthesis by regulating the expression of SbGL2 in sorghum, thus affecting the accumulation of fatty acid-derived volatiles. Taken together, our study identified Tannin1 as the gene underlying the major locus controlling bird feeding behavior in sorghum, illustrating an example of the identification of an ecologically impactful molecular mechanism from field observation and providing significant insights into the chemistry of bird–plant ecological interactions.