Background: The dysfunctional blood–brain barrier (BBB)–glymphatic system is responsible for triggering intracerebral amyloid-beta peptide (Aβ) accumulation and acts as the key link between ischemic stroke and dementia dominated by Alzheimer’s disease (AD). Recently, pyroptosis in cerebral ischemia and reperfusion (I/R) injury is demonstrated as a considerable mechanism causing BBB–glymphatic dysfunctions and Aβ acute accumulation in the brain. Targeting glial pyroptosis to protect BBB–glymphatic functions after cerebral I/R could offer a new viewpoint to prevent Aβ accumulation and poststroke dementia. Yi-Zhi-Fang-Dai formula (YZFDF) is an herbal prescription used to cure dementia with multiple effects of regulating inflammatory responses and protecting the BBB against toxic Aβ-induced damage. Hence, YZFDF potentially possesses neuroprotective effects against cerebral I/R injury and the early pathology of poststroke dementia, which evokes our current study.Objectives: The present study was designed to confirm the potential efficacy of YZFDF against cerebral I/R injury and explore the possible mechanism associated with alleviating Aβ acute accumulation.Methods: The models of cerebral I/R injury in rats were built by the method of middle cerebral artery occlusion/reperfusion (MCAO/R). First, neurological function assessment and cerebral infarct measurement were used for confirming the efficacy of YZFDF on cerebral I/R injury, and the optimal dosage (YZFDF-H) was selected to conduct the experiments, which included Western blotting detections of pyroptosis, Aβ1-42 oligomers, and NeuN, immunofluorescence observations of glial pyroptosis, aquaporin-4 (AQP-4), and Aβ locations, brain water content measurement, SMI 71 (a specific marker for BBB)/AQP-4 immunohistochemistry, and Nissl staining to further evaluate BBB–glymphatic functions and neuronal damage.Results: YZFDF obviously alleviated neurological deficits and cerebral infarct after cerebral I/R in rats. Furthermore, YZFDF could inactivate pyroptosis signaling via inhibiting caspase-1/11 activation and gasdermin D cleavage, ameliorate glial pyroptosis and neuroinflammation, protect against BBB collapse and AQP-4 depolarization, prevent Aβ acute accumulation and Aβ1-42 oligomers formation, and reduce neuronal damage and increase neurons survival after reperfusion.Conclusion: Our study indicated that YZFDF could exert neuroprotective effects on cerebral I/R injury and prevent Aβ acute accumulation in the brain after cerebral I/R associated with inhibiting neuroinflammation-related pyroptosis and BBB–glymphatic dysfunctions.