Objective. Estrogen is a critical hormone that is mainly produced by the ovary in females. Estrogen deficiency leads to various syndromes and diseases, partly due to gut microbiota alterations. Previous studies have shown that estrogen deficiency affects the gut microbiota at 6–8 weeks after ovariectomy, but the immediate effect of estrogen deficiency on the gut microbiota remains poorly understood. Methods. To investigate the short time and dynamic effects of decreased estrogen levels on the gut microbiota and their potential impact on estrogen deficiency-related diseases, we performed metagenomic sequencing of 260 fecal samples from 50 ovariectomy (OVX) and 15 control C57BL/6 female mice at four time points after surgery. Results. We found that seven gut microbiota species, including E. coli, Parabacteroides unclassified, Lachnospiraceae bacterium 8_1_57FAA, Bacteroides uniformis, Veillonella unclassified, Bacteroides xylanisolvens, and Firmicutes bacterium M10_2, were abundant in OVX mice. The abundance of these species increased with time after OVX surgery. The relative abundance of the opportunistic pathogen E. coli and the Crohn's disease-related Veillonella spp. was significantly correlated with mouse weight gain in the OVX group. Butyrate production and the Entner–Doudoroff pathway were significantly enriched in the control mouse group, while the degradation of glutamic acid and aspartic acid was enriched in the OVX mouse group. As the time after OVX surgery increased, the bacterial species and metabolic pathways significantly changed and tended to suggest an inflammatory environment, indicating a subhealthy state of the gut microbiota in the OVX mouse group. Conclusions. Taken together, our results show that the dynamic gut microbiota profile alteration caused by estrogen deficiency is related to obesity and inflammation, which may lead to immune and metabolic disorders. This study provides new clues for the treatment of estrogen deficiency-related diseases.