Existing studies have reported sustained changes in the cortical structure of rats due to coffee-related factors, which are speculated to occur in the human body. However, there is a lack of research on this topic. Additionally, previous observational studies have found the impact of diseases on cortical structure and the potential therapeutic effects of coffee on these diseases. Our aim was to study the causal effects of coffee-related factors on the human brain using SNPs (single nucleotide polymorphisms). We will connect these discovered causal effects to the impact of diseases on the brain. Through triangulating evidence, we will reveal the potential active areas of coffee in preventing diseases. We utilized GWAS data from multiple cohorts and their databases, selecting instrumental variables for genetic prediction of coffee intake and plasma levels of caffeine and its direct metabolites. We applied these instrumental variables to individual data on cortical thickness and surface area, as well as hippocampal volume, from the ENIGMA and CHARGE consortium for Mendelian randomization analysis (MR). Triangular evidence was obtained by integrating existing evidence through a specified retrieval strategy, calculating the overlap between coffee's effects on brain regions and disease-related brain regions to identify potential regions of action. The MR analysis yielded 93 positive results for 9 exposures, among which theobromine, a metabolite in the caffeine pathway, was found to be associated with increased hippocampal volume. For cortical structure, theobromine in the caffeine pathway was associated with a decrease in total surface area, while theobromine and caffeine in the pathway were associated with an increase in total thickness. The overlap rate of triangular evidence showed no difference in both overall and subgroup analyses, indicating a high overlap between the effects of coffee on brain regions and disease. From predicted outcomes from causal effects, coffee intake-related factors may have lasting effects on cortical structure. Additionally, theobromine and theophylline have the greatest impact on certain brain gyri, rather than caffeine. Triangulation evidence indicates that disease and coffee intake-related factors act on the same cortical regions, suggesting the presence of potential shared or antagonistic pathways.