The biological clock regulates not only sleep or hormone secretion but also higher brain functions such as memory formation in mammals. We found that remote spatial memory was most efficient when learning occurred at the beginning of the light period (dawn) in mice, although there was no diurnal change in recent memory. We found that two 7α-hydroxy-neurosteroids (7α-hydroxypregnenolone [7α-OH-Preg] and 7α-hydroxydehydroepiandrosterone [7α-OH-DHEA]) are involved in spatial memory maintenance. The neurosteroids are synthesized from cholesterol by a new member of P450 hydroxylase, CYP7B1. Cyp7b1 mRNA was detected widely in the mouse brain with high levels in the hippocampus with diurnal change. We identified the occurrence of 7α-OH-Preg and 7α-OH-DHEA in the mouse hippocampus after Morris’s water maze task at the beginning of the light period by using LC-MS/MS. Cyp7b1 deficiency impaired remote spatial memory, with recent memory mostly unaffected. The hippocampal dendritic spine densities were reduced in Cyp7b1-KO mice and no more increased by the training in Cyp7b1-KO mice. Chronic intracerebroventricular administration of 7α-OH-Preg and 7α-OH-DHEA in Cyp7b1-KO mice improved the spine density and remote spatial memory performance. Notably, this improvement was more significant when the mixture of 7α-hydroxylated steroids was administered than the single neurosteroid administration. We concluded that the 7α-hydroxylated neurosteroids are required for synaptic remodeling for long-term maintenance of spatial memory in mice (iScience 2020).