Introduction The potential positive impact of computer game playing on cognitive function and its potential role in reducing the risk of Alzheimer's disease (AD) has been suggested. However, current observational studies have certain limitations. We utilized Mendelian randomization (MR) alongside extensive genome-wide association study (GWAS) data to examine the relationship between computer game playing, cognitive function, risk of AD, and levels of brain-derived neurotrophic factor (BDNF). Methods We collected datasets on computer game playing, cognition function, risk of AD, and BDNF level from the IEU Open GWAS project. Causal effects were assessed using various MR methods, including inverse variance weighted (IVW), weighted median, MR-Egger, simple mode, and weighted mode. To ensure the accuracy of the results, sensitivity analyses were conducted. Results Our analysis revealed a significant association between computer game playing and cognitive function ( β = 0.801, 95% CI: 0.351, 1.328, P = 0.001). There was no statistically significant association between computer game playing and either BDNF level or risk of AD ( β = −0.112, 95%CI: −1.315, 1.091, P = 0.855; OR = 1.000, 95% CI: 1.004, 0.997, P = 0.891, respectively). We further confirmed the reliability of our evidence through the MR-Egger intercept test, MR-PRESSO global test, Cochran's Q test, and funnel plots. Conclusion The results of our study indicate that engaging in computer game playing may confer a safeguarding influence on cognitive function. This underscores the potential advantages associated with computer gaming. Nevertheless, given the constraints inherent in our research, further investigation is warranted to substantiate our findings and delve into the underlying mechanisms.