Premature ovarian failure (POF) is a typical form of pathological aging with complex pathogenesis and no effective treatment. Meanwhile, recent studies have reported that a high-fat and high-sugar (HFHS) diet adversely affects ovarian function and ovum quality. Here, we investigated the therapeutic effect of thymopentin (TP-5) as a treatment for murine POF derived from HFHS and its target. Pathological examination and hormone assays confirmed that TP-5 significantly improved murine POF symptoms. And, TP-5 could reduce oxidative stress injury and blood lipids in the murine POF derived from HFHS. Flow cytometry and qPCR results suggested that TP-5 attenuated activation of CD3+ T cells and type I macrophages. RNA-Seq results indicated somedifferences in gene transcription between the TP-5 intervention group and the control group. KEGG analysis indicated that the expression of genes involved in the mTOR signaling pathway was the most significantly different between the two groups. Additionally, compared with the control groups, the expression levels of interleukin, NFκB, and TNF families of genes were significantly downregulated in the POF+TP-5 group, whereas expression of the TGFβ/Smad9 genes was significantly upregulated. Finally, immunofluorescence staining and qPCR confirmed that TP-5 promoted the polarization of Mø2 cells in the ovary by activating the expression of the BMP4/Smad9 signalling pathway. Thus, our study confirmed that TP-5 has a significant therapeutic effect on POF by upregulating BMP4/Smad9 signalling pathway so as to promote the balance and polarization of immune cell and reducing the release of inflammatory factors and reduce lipid oxidative stress injury.