This study shows that prolonged anesthesia triggers activation of the NF-κB inflammatory pathway, neuroinflammation, inhibition of neuronal excitability, cognitive dysfunction, and anxiety-like behaviors. Here, NFKB1 is linked to Anxiety.