Introduction. Atrial fibrillation (AF) is an independent risk factor for cognitive decline (CD). However, the role of iron deficiency (ID) and anemia as modifiable factors exacerbating cognitive impairment in this issue remains understudied. Aim. To assess the impact of anemia/ID on the condition of cognitive functions young and middle age patients with AF. Mat erials and methods. This cross-sectional study included 45 patients with AF (median age 53.2 [50.4; 57.2] years), divided into two groups: with anemia and/or ID (n = 23) and without (n = 22). Cognitive function was assessed using the Montreal Cognitive Assessment (MoCA), Mini-Mental State Examination (MMSE), Trail Making Test (Parts A & B), Verbal Fluency Test, Word-List Recall, Stroop Test, Digit Span Test, and Digit Symbol Substitution Test (DSST). Anxiety and depression levels were evaluated using the Beck Anxiety Inventory (BAI) and Hamilton Depression Rating Scale (HDRS). Results. Compared to patients without anemia/ID, patients with AF and anemia/ID demonstrated significantly lower total scores on the MoCA (26 [25; 27] vs 28 [27; 28.5] points, p < 0.001) and MMSE (26 [25; 26] vs 28 [28; 29] points, p < 0.001). They also showed reduced performance in immediate word recall (4 [4; 5] vs 5 [5; 5.3] words, p = 0.032), delayed recall (3 [3; 3.3] vs 4 [4; 5] words, p < 0.001), and the letter fluency test (13 [12.8; 14] vs 14 [13; 15] words, p = 0.013). Psychomotor speed was slower on the DSST (46 [41; 50] vs 55 [44.8; 65] points, p = 0.011), attention was worse on the Digit Span Test (4 [4; 4.3] vs 5 [4.8; 5.3] points, p = 0.005), and execution time was longer for Trail Making Test Part A (61.5 [57.8; 63.8] vs 50 [45; 57.3] s, p < 0.001) and Part B (79.5 [74; 92] vs 69 [64; 77] s, p < 0.001). Conclusions. Anemia/ID in young and middle-aged patients with AF is associated with multiple cognitive deficits, which justifies the need for screening of iron metabolism and hemoglobin levels in this patient population.