Our previous studies reported that testosterone-deprived rats developed cognitive decline as a result of increased brain oxidative stress, microglia hyperactivity, and hippocampal dysplasticity. In addition, gut dysbiosis occurred in these rats. Previous studies demonstrated that n-acetyl cysteine (NAC) and a prebiotic (inulin) improved cognition in several pathological conditions. However, its effects on cognition in the testosterone-deprived condition have never been investigated. This study hypothesized that the administration of NAC, inulin, and a combined therapy improved cognition in castrated rats. Here we report that metabolic disturbance was not observed in the ORX rats, but gut dysbiosis was found in these rats. ORX rats developed blood-brain-barrier (BBB) breakdown, and increased brain oxidative stress as indicated by increased hippocampal production of reactive oxygen species (ROS) and an increase in brain malondialdehyde level. ORX rats also demonstrated glia hyperactivation, resulting in hippocampal apoptosis, hippocampal dysplasticity, and cognitive decline. All treatments equally ameliorated cognitive decline by improving gut dysbiosis, alleviating BBB dysfunction, decreasing hippocampal ROS production, decreasing hippocampal apoptosis, and reducing microglia and astrocyte activity. These findings suggest that NAC, inulin, and the combined therapy ameliorated the deleterious effects on the brain in castrated male rats similar to those treated with testosterone.