Toll-like receptors (TLRs) play key roles in cerebral ischemia and reperfusion injury by inducing the production of inflammatory mediators, such as interleukins (ILs) and tumor necrosis factor-alpha (TNF-α). According to recent studies, ursolic acid (UA) regulates TLR signaling and exhibits notable anti-inflammatory properties. In the present study, we explored the mechanism by which UA regulates inflammation in the rat middle cerebral artery occlusion and reperfusion (MCAO/R) model. The MCAO/R model was induced in male Sprague–Dawley rats (MCAO for 2 h, followed by reperfusion for 48 h). UA was administered intragastrically at 0.5, 24, and 47 h after reperfusion. The direct high mobility group box 1 (HMGB1) inhibitor glycyrrhizin (GL) was injected intravenously after 0.5 h of ischemia as a positive control. The degree of brain damage was estimated using the neurological deficit score, infarct volume, histopathological changes, and neuronal apoptosis. We assessed IL-1β, TNF-α, and IL-6 levels to evaluate post-ischemic inflammation. HMGB1 and TLR4 expression and phosphorylation of nuclear factor kappa-light-chain-enhancer of activated B cell (NFκB) were also examined to explore the underlying mechanism. UA (10 and 20 mg/kg) treatment significantly decreased the neurological deficit scores, infarct volume, apoptotic cells, and IL-1β, TNF-α, and IL-6 concentrations. The infarct area ratio was reduced by (33.07 ± 1.74), (27.05 ± 1.13), (27.49 ± 1.87), and (39.74 ± 2.14)% in the 10 and 20 mg/kg UA, GL, and control groups, respectively. Furthermore, UA (10 and 20 mg/kg) treatment significantly decreased HMGB1 release and the TLR4 level and inactivated NFκB signaling. Thus, the effects of intragastric administration of 20 mg/kg of UA and 10 mg/kg of GL were similar. We provide novel evidence that UA reduces inflammatory cytokine production to protect the brain from cerebral ischemia and reperfusion injury possibly through the HMGB1/TLR4/NFκB signaling pathway.