Total saponins from Trillium tschonoskii Maxim (TSTT), a bioactive component of local natural herbs in the Enshi area, China, have been demonstrated to have functions of restoring cognitive capacity and promoting axonal regeneration post-stroke, but the mechanism of this process remains unclear. The hippocampus is a critical tissue for controlling learning and memory capacity, and the sonic hedgehog (Shh) signaling pathway plays a major role in the patterning and synaptic plasticity of hippocampal neural circuits. Therefore, we aimed to investigate whether TSTT could restore learning and cognitive functions by modulating the Shh pathway in rats with post-stroke cognitive impairment (PSCI). The ischemia model was established by permanent middle cerebral artery occlusion (MCAO) in 100 Sprague–Dawley (SD) rats, and the model rats were administered using TSTT (100 mg/kg) or donepezil hydrochloride as the positive control (daily 0.45 mg/kg, DON) for 4 weeks after the operation. As assessed by the Morris water maze test, the cognitive function of PSCI rats was significantly improved upon TSTT treatment. Meanwhile, the cerebral infarct volume reduced with TSTT, as shown by HE and TTC staining, and the number of Nissl bodies and dendritic spine density were significantly increased, as shown by Nissl and Golgi staining. In addition, TSTT upregulated PSD-95, SYN, and GAP-43, and inhibited neuronal apoptosis, as evidenced by increased Bcl-2 levels along with decreased Bax and caspase-3 expression. TSTT could also significantly upregulate Shh, Ptch1, Smo, and Gli1 proteins, indicating the activation of the Shh signaling pathway. Therefore, TSTT can protect PSCI rats by inhibiting apoptosis and promoting neuronal synaptic remodeling. The Shh pathway is also involved.