Neonatal hypoxic-ischemic (HI) brain injury is associated with long-term neurological disorders, and protective strategies are presently scarce. Sodium 4-phenylbutyrate (4-PBA) reportedly acts as a chemical chaperone that alleviates endoplasmic reticulum (ER) stress, which plays a critical role in neurological diseases. The present study aimed to evaluate the neuroprotective effects of 4-PBA on HI-induced neonatal brain injury in a rat model, and to characterize possible underlying mechanisms. The HI brain injury model was established by ligating the left common carotid artery in 7-day-old rats, followed by exposure to 8% oxygen for 2 h. The 4-PBA or vehicle was administered by an intracerebroventricular injection 30 min before HI. The protein expression levels of ER stress markers (GRP78, ATF6, and CHOP) were detected by western blotting at 24 h after HI insult. The activation of cAMP-response element-binding protein (CREB) was evaluated by western blotting and immunofluorescence. TUNEL and Nissl staining were performed to detect the histomorphological changes in the hippocampal neurons at 24 h and 7 days, respectively, after HI injury. From days 29 to 34 after brain HI, rats underwent Morris water maze tests to assess cognitive functioning. The results showed that pretreatment with 4-PBA decreased HI-induced excessive ER stress and neuronal injury. Moreover, CREB activation might be involved in the beneficial effects of 4-PBA on HI-induced learning and memory deficits in rats. In conclusion, the present study suggested a potential therapeutic approach of ER stress inhibition in the treatment of neonatal HI brain injury.