Background: Post-stroke depression (PSD) is one of the most common complications of stroke. Many studies have confirmed that PSD is associated with the abnormal release of glutamic acid (Glu) via the Ca2+/calmodulin (CaM)/CaM-dependent protein kinase II (CaMKII) and connexin 43 (Cx43) hemichannel pathways. Onjisaponin B, a traditional Chinese medicine, has been discovered to have neuroprotective effects. Objectives: In this study, we aimed to investigate the effects and underlying mechanisms of onjisaponin B on the release of glutamate in rat astrocytes subjected to oxygen and glucose deprivation (OGD). Materials and Methods: The ischemic and anoxic cell model was established in rat astrocytes through OGD injury. Rat astrocytes were randomly divided into control, model, 10 μM onjisaponin B, and 20 μM onjisaponin B groups. Cell viability was assessed by acridine orange/ethidium bromide bilabel assay. The intracellular Ca2+ level was measured with Fluo-3-AM as the fluorescence indicator. Western blot analysis and quantitative polymerase chain reaction were used to detect the expressions of Cx43 and CaMKII in the samples. The glutamate level of the extracellular fluid was determined using high-performance liquid chromatography-mass spectrometry. Results: The intracellular Ca2+ levels and the mRNA and protein expression of CaMKII and Cx43 in the onjisaponin B group were significantly lower than that of the model group. The glutamate level in the extracellular fluid was significantly reduced by onjisaponin B in comparison to that in the model group. Moreover, onjisaponin B attenuated the inhibitory effect of OGD on the cell viability of astrocytes. Conclusion: The results of this study suggest that onjisaponin B reduced the release of glutamate via inhibition of the Ca2+/CaMKII and Cx43 pathways in the rat astrocytes, thus inhibiting the downstream glutamic pathway and reinforcing the cell viability of astrocyte.