Iron deficiency anemia (IDA) is one of the most prevalent nutritional deficiencies worldwide. Iron plays critical roles in nervous system development and cognition. Despite the known detrimental consequences of IDA on cognition, available studies do not provide molecular mechanisms elucidating the role of iron in brain functions during iron deficiency and recovery with dairy components. In this study, 100 male Wistar rats were placed on a pre-experimental period of 40 days and randomly divided in two groups: a control group receiving a normal-Fe diet, (45 mg/kg), and an Fe-deficient group receiving a low-Fe diet (5 mg/kg). At day 40, 10 rats per group were sacrificed to anemia control, and 80 rats were divided into eight experimental groups fed with fermented goat or cow milk-based diets, with normal Fe content or Fe overload (450 mg/kg) for 30 days. IDA decreased most of the parameters related to brain molecular functions, namely dopamine, irisin, MAO-A, oxytocin, β-endorphin, and α-MSH, while it increased synaptophysin. These alterations result in an impairment of brain molecular functions. In general, during anemia recovery, fermented goat milk diet consumption increased dopamine, oxytocin, serotonin, synaptophysin, and α-MSH, and decreased MAO-A and MAO-B, suggesting a potential neuroprotective effect in brain functions, which could enhance brain molecular functions.