Treatment with NaHS significantly decreased the cognitive impairment of rats after SAH and simultaneously reduced the expression of TNF-α, TLR4, and NF-κB p65 and alleviated the nuclear translocation of NF-κB p65 (p < 0.05). Here, NFKB1 is linked to Cognitive impairment.