Exogenous NaHS treatment reduced the cognitive impairment of rats after SAH by ameliorating neuroinflammation in microglia, potentially via the TLR4/NF‐κB pathway. The gene discussed is TLR4; the disease is Cognitive impairment.