Cognitive impairment induced by postoperative pain severely deteriorates the rehabilitation outcomes in elderly patients. The present study focused on the relationship between microglial exosome miR‐124‐3p in hippocampus and cognitive impairment induced by postoperative pain. Cognitive impairment model induced by postoperative pain was constructed by intramedullary nail fixation after tibial fracture. Morphine intraperitoneally was carried out for postoperative analgesia. Morris water maze tests were carried out to evaluate the cognitive impairment, while mRNA levels of neurotrophic factors (BDNF, NG) and neurodegenerative biomarker (VILIP‐1) in hippocampus were tested by q‐PCR. Transmission electron microscope was used to observe the axon degeneration in hippocampus. The levels of pro‐inflammatory factors (TNF‐α, IL‐1β, IL‐6), the levels of anti‐inflammatory factors (Ym, Arg‐1, IL‐10) and microglia proliferation marker cyclin D1 in hippocampus were measured to evaluate microglia polarization. Bioinformatics analysis was conducted to identify key exosomes while BV‐2 microglia overexpressing exosome miR‐124‐3p was constructed to observe microglia polarization in vitro experiments. Exogenous miR‐124‐3p‐loaded exosomes were injected into hippocampus in vivo. Postoperative pain induced by intramedullary fixation after tibial fracture was confirmed by decreased mechanical and thermal pain thresholds. Postoperative pain induced cognitive impairment, promoted axon demyelination, decreased BDNF, NG and increased VILIP‐1 expressions in hippocampus. Postoperative pain also increased pro‐inflammatory factors, cyclin D1 and decreased anti‐inflammatory factors in hippocampus. However, these changes were all reversed by morphine analgesia. Bioinformatics analysis identified the critical role of exosome miR‐124‐3p in cognitive impairment, which was confirmed to be down‐regulated in hippocampus of postoperative pain mice. BV‐2 microglia overexpressing exosome miR‐124‐3p showed decreased pro‐inflammatory factors, cyclin D1 and increased anti‐inflammatory factors. In vivo, stereotactic injection of exogenous miR‐124‐3p into hippocampus decreased pro‐inflammatory factors, cyclin D1 and increased anti‐inflammatory factors. The cognitive impairment, axon demyelination, decreased BDNF, NG and increased VILIP‐1 expressions in hippocampus were all alleviated by exogenous exosome miR‐124‐3p. Microglial exosome miR‐124‐3p in hippocampus alleviates cognitive impairment induced by postoperative pain through microglia polarization in elderly mice.