Background: Polycystic ovary syndrome (PCOS), one of the most common endocrine diseases in women of childbearing age, has been found to be accompanied by changes in the gut microbiota. The Bu Shen Yang Xue formula (BSYXF) is a traditional Chinese medicine widely used for the treatment of PCOS. This study aimed to investigate whether the protective effects of β-sitosterol, the main active ingredient of BSYXF, on PCOS was mediated by regulating gut microbiota.Methods: The presence of β-sitosterol in BSYXF was detected by liquid chromatography-mass spectrometry. The PCOS-like mouse model was induced by dehydroepiandrosterone. The fecal supernatant of β-sitosterol-treated mice was prepared for fecal microbiota transplantation (FMT). Body weight and wet weight of the uterus and ovary of the mice were recorded for organ index calculation. Hematoxylin and eosin stain was used to assess the endometrial morphology and microenvironment changes. Expression of endometrial receptivity markers cyclooxygenase-2 (COX-2), Integrin ανβ3, leukemia inhibitory factor (LIF), and homeobox A10 (HOXA10) in the endometrium were determined by immunohistochemistry and western blot analysis. Enzyme-linked immunosorbent assay was employed to detect the expression of follicle stimulating hormone (FSH), luteinizing hormone (LH), progesterone (P), and testosterone (T) in the serum. The diversity of gut microbiota was examined by 16S rDNA gene sequencing.Results: With the treatment of β-sitosterol and β-sitosterol-FMT, the uterine index of PCOS-like mice increased, the ovarian index decreased, levels of COX-2, LH and T decreased, and levels of Integrin ανβ3, LIF, HOXA10, FSH, and P increased. Under β-sitosterol treatment, the structure of the gut microbiota in PCOS-like mice was also changed.Conclusion: β-sitosterol regulates the endometrial receptivity of PCOS and harmonizes the sex hormone balance, which may be related to the changes in the structure and composition of gut microbiota, thus affecting the pathological process of PCOS.