Transient global amnesia (TGA), which is described as short-term amnesia, may be influenced by some dietary components involved in brain function. The aim of the present study was to assess the connection between TGA and dietary intake of vitamin B12. This cross-sectional study was conducted on 258 people with TGA and 520 people without TGA in Sabzevar, Iran. All participants were screened for TGA (ICD-10 code: G45.4). A validated Food Frequency Questionnaire (FFQ) was utilized to estimate the dietary intake of vitamin B12. Different models of logistic regression were used to determine the association between TGA and dietary intake of vitamin B12 after adjusting the confounders. There was an inverse association between the risk of TGA and the intake of vitamin B12 (OR = 0.94, CI 95%: 0.89-0.99, p= .02, effect size: -0.04). The result did not change after adjustment for age, gender, education, job, and marital status (OR = 0.93, CI 95%: 0.88-0.98, p= .01, effect size: -0.03). The result remained significant after additional adjustments for body mass index (BMI) and physical activity (OR = 0.94, CI 95%: 0.89-0.99, p= .03, effect size: -0.04), and after further adjustments for the underlying diseases, including diabetes, hypertension, and stroke (OR = 0.86, CI 95%: 0.81-0.92, p< .01, effect size: -0.10). Vitamin B12 deficiency may increase the risk of TGA and should be considered as a potential concern for people at risk for TGA. Further studies are needed to validate these findings and to discover the underlying mechanisms of the effects of vitamin B12 on TGA.