The brain relies on a range of nutrients for optimal functioning. However, the causal nature between dietary components and human intelligence are still unclear. This study integrates Mendelian randomization (MR) and genome-wide associations analyses to investigate the relationships. The results show that cheese exerts the most remarkable genetic correlation and causal association with cognition-related traits. We conduct a large-scale meta-analysis of genome-wide associations studies (GWAS) consisting of over 800,000 participants and discover 71 genetic determinants for cheese consumption. Additional MR using the GWAS results recovers the causal effects of cheese on all the cognition-related traits, and also reveals its effects on education, psychological states and gene expressions in multiple brain tissues. Additionally, knockout mouse models and pathway enrichment analysis indicate that the loci mapped genes are involved in cognitive functions and brain characteristics. In conclusion, our comprehensive analysis supports the potential benefits of cheese consumption on human intelligence.