Transcranial magnetic stimulation (TMS) as a non-invasive neuroregulatory technique has been applied in the clinical treatment of neurological and psychiatric diseases. However, the stimulation effects and neural regulatory mechanisms of TMS with different frequencies and modes are not yet clear. This article explores the effects of different frequency repetitive transcranial magnetic stimulation (rTMS) and burst transcranial magnetic stimulation (bTMS) on memory function and neuronal excitability in mice from the perspective of neuroelectrophysiology. In this experiment, 42 Kunming mice aged 8 weeks were randomly divided into pseudo stimulation group and stimulation groups. The stimulation group included rTMS stimulation groups with different frequencies (1, 5, 10 Hz), and bTMS stimulation groups with different frequencies (1, 5, 10 Hz). Among them, the stimulation group received continuous stimulation for 14 days. After the stimulation, the mice underwent new object recognition and platform jumping experiment to test their memory ability. Subsequently, brain slice patch clamp experiment was conducted to analyze the excitability of granulosa cells in the dentate gyrus (DG) of mice. The results showed that compared with the pseudo stimulation group, high-frequency (5, 10 Hz) rTMS and bTMS could improve the memory ability and neuronal excitability of mice, while low-frequency (1 Hz) rTMS and bTMS have no significant effect. For the two stimulation modes at the same frequency, their effects on memory function and neuronal excitability of mice have no significant difference. The results of this study suggest that high-frequency TMS can improve memory function in mice by increasing the excitability of hippocampal DG granule neurons. This article provides experimental and theoretical basis for the mechanism research and clinical application of TMS in improving cognitive function.