Ketamine is an anesthetic and analgesic drug widely used in clinical anesthesia. To ensure the safety of anesthesia, it is necessary to study its side effects. Pregnancy is a key period for the development and growth of offspring. During this period, the proliferation and differentiation of brain cells and the synaptic formation are easily affected by external stimuli. Therefore, the aim of this study was to evaluate the effect of ketamine. Ketamine anesthesia was administered to rats in the second trimester of pregnancy, and two behavioral tests were performed, including contextual and cued fear conditioning test (CFC) and Morris water maze (MWM). At the end of the behavioral test, Nissl and Golgi staining were used to detect the dendrite density of hippocampal neurons to reveal the effect of maternal ketamine anesthesia on the hippocampus of offspring. Key proteins and their downstream transcription factors in Wnt/β-catenin signaling pathway from the embryonic development to the adulthood were studied. Our results showed that rats receiving maternal ketamine suffered from nerve injury. The density of hippocampal nerves and dendritic spine changed. Some genes related to Wnt/β-catenin pathway and Tcf/Lef were downregulated. In conclusion, maternal anesthesia with ketamine in the second trimester of pregnancy can lead to cognitive memory impairment and neurotoxicity in the hippocampus of offspring through Wnt/ β-catenin signaling pathway.