Perioperative neurocognitive disorders (PNDs) are common neurological complications after anesthesia in the elderly. Protein tyrosine phosphatase non-receptor type 2 (PTPN2) regulates signal transducer and activator of transcription protein 3 (STAT3) signaling to control inflammation in certain organs, but its role in PNDs remains unknown. Herein, we constructed a PND model in 18-month-old rats by treating them with sevoflurane. PND rats developed neuroinflammation, along with a significant decrease in PTPN2 expression and a rise in STAT3 phosphorylation in the hippocampus. Ptpn2 overexpression alleviated the behavioral disorders of PND rats, ameliorated neuronal injury, inhibited neuroinflammation, inflammasome activation, microglial activation, and microglial phenotype switching. Similar results were observed in sevoflurane-treated HMC3 microglia with PTPN2 overexpression, while PTPN2 silencing showed the opposite results. Additionally, PTPN2 seems to be a target of T-box transcription factor 2 (TBX2). These results contribute to the evidence supporting the idea that PTPN2 is a regulatory factor in PND progression.