Gut microorganisms can profoundly influence brain function in the host and their behavior. Since altered brain functional connectivity (FC) has been implicated in various cerebrovascular disorders, including cerebral ischemia-reperfusion (I/R) injury, we hypothesized that gut microbiota in mice with cerebral I/R injury would affect brain FC when transplanted into germ-free mice. Metagenomic analysis of germ-free male C57BL/6J mice colonized with microbiota from mice with and without cerebral I/R injury showed a clear distinction in microbiota composition between mice colonized with control and I/R microbiota. The I/R microbiota-colonized mice showed decreased FC in the cingulate cortex, hippocampus, and thalamus, and exhibited increased anxiety as well as diminished spatial learning and memory and short-term object recognition memory. I/R microbiota-colonized mice also had significantly reduced dendritic spine density and synaptic protein levels and exhibited increased hippocampal inflammation. These results indicate that gut microbiota components from mice with cerebral I/R injury can alter animal behavior, brain functional connectivity, hippocampal neuronal plasticity, and neuroinflammation. Moreover, they increase our understanding of the mechanisms through which the gut microbiome contributes to the pathobiology of cerebrovascular diseases.