Background. The traditional Chinese medicines of Buyang Huanwu decoction (BYHW), Naoxintong capsule (NXT), and Yangyin Tongnao granules (YYTN) have excellent effects in preventing and treating cerebrovascular disease and are widely tolerated by patients. However, their effects on middle cerebral artery occlusion (MCAO) remain unknown. Methods. We evaluated gut microbiota alterations, the brain transcriptome, and nerve cell responses in rats with MCAO. Results. Our results showed that BYHW, NXT, and YYTN not only effectively improved the damaged state of blood vessels in rats and restored nerve function, but also improved survival. Additional experiments showed that treatment with BYHW, NXT, and YYTN regulated the intestinal microflora. Transcriptome analyses showed that BYHW, NXT, and YYTN modulated the transcriptome of rats with MCAO. The common mechanism of the three prescriptions for the treatment of cerebral ischemia may be related to the intestinal flora regulation of 60S ribosomal protein L18 (Rpl18), eukaryotic translation initiation factor 3 subunit, Ras homolog family member C, G protein subunit gamma 13 (Gng13), and Gng10 genes, among which Rpl18 is the most important. In addition, the three prescriptions had great specificity as anticerebral ischemia targets. Moreover, BYHW, NXT, and YYTN mitigated MCAO-induced hyperactivation of microglia and astrocytes. Conclusion. This study provides a foundation for further research on the mechanisms and treatment of IS. The results strongly suggest that key gut microbiota can be used to study functional genomics of brain, leading to novel discoveries about key genes involved in important biological processes.