Elevated intracranial pressure (IcP) is one of the most common complications following an ischemic stroke, and has implications for the clinical and neurological outcomes. The aim of the present study was to examine whether elevated IcP may increase IL-1β and IL-18 secretion by activating the NOD-like receptor protein 3 (NLRP3) inflammasome in microglia of ischemic adult rats. Sprague-dawley rats that underwent middle cerebral artery occlusion were used for assessment of IcP. Reactive oxygen species (ROS) production was detected, and western blotting and immunofluorescence staining were used to determine the expression levels of caspase-1, gasdermin d-N domains (GSdMd-N), IL-1β and IL-18 in microglial cells. ICP levels were significantly increased, which was accompanied by ROS overproduction, in the brain tissue following ischemia-reperfusion (IR) injury in rats. Treatment with 10% hypertonic saline by intravenous injection significantly reduced the ICP and ROS levels of the rats. Furthermore, high pressure (20 mmHg) combined with oxygen-glucose deprivation (OGd) treatment resulted in increased ROS production in BV-2 microglial cells compared with those subjected to OGd treatment alone in vitro. Elevated pressure upregulated the expression of caspase-1, GSdMd-N, IL-18 and IL-1β in IR-treated or OGd-treated microglia both in vivo and in vitro. More importantly, caspase-1, GSdMd-N, IL-18 and IL-1β expression in microglia was significantly downregulated when elevated pressure was reduced or removed. These results suggested that elevated IcP-induced IL-1β and IL-18 overproduction via activation of the NLRP3 inflammasome by ischemia-activated microglia may augment neuroinflammation.