It was demonstrated that anesthesia/surgery significantly aggravates the anxiety- and depression-like behaviors, activates microglia, increases pro-inflammatory cytokines (IL-6 and TNF-α), induces microbiota dysbiosis, and promotes the restructuring of metabolites in rats suffering from preoperative stress. The gene discussed is TNF; the disease is major depressive disorder.