Cognitive alterations are a common feature associated with many neurodegenerative diseases and are considered a major health concern worldwide. Cognitive alterations are triggered by microglia activation and oxidative/inflammatory processes in specific areas of the central nervous system. Consumption of bioactive compounds with antioxidative and anti-inflammatory effects, such as astaxanthin and spirulina, can help in preventing the development of these pathologies. In this study, we have investigated the potential beneficial neuroprotective effects of a low dose of astaxanthin (ASX) microencapsulated within spirulina (ASXSP) in female rats to prevent the cognitive deficits associated with the administration of LPS. Alterations in memory processing were evaluated in the Y-Maze and Morris Water Maze (MWM) paradigms. Changes in microglia activation and in gut microbiota content were also investigated. Our results demonstrate that LPS modified long-term memory in the MWM and increased microglia activation in the hippocampus and prefrontal cortex. Preventive treatment with ASXSP ameliorated LPS-cognitive alterations and microglia activation in both brain regions. Moreover, ASXSP was able to partially revert LPS-induced gut dysbiosis. Our results demonstrate the neuroprotective benefits of ASX when microencapsulated with spirulina acting through different mechanisms, including antioxidant, anti-inflammatory and, probably, prebiotic actions.