Postoperative cognitive dysfunction (POCD) is a common postsurgical complication in elderly individuals, significantly impacting the quality of life of patients; however, there is currently no effective clinical treatment for POCD. Recent studies have shown that Icariin (ICA) has antiaging effects and improves cognitive function, but its effect in POCD has not been studied. In this study, we investigated the influence of ICA on cognitive function and the TLR4/NF-κB signaling pathway in a POCD rat model. We found that ICA reduced surgery-induced memory impairment, decreased hippocampal inflammatory responses, ameliorated neuronal injury in the hippocampus and inhibited microglial activation. In addition, we also observed that ICA inhibited activation of the TLR4/NF-κB signaling pathway. In summary, our research suggest that ICA can ameliorate surgery-induced memory impairment and that the improvements resulting from administration of ICA may be associated with inhibition of hippocampal neuroinflammation. Our research findings also provide insight into potential therapeutic targets and methods for POCD.