All these findings indicated that melatonin played a protective role in endometritis by inhibiting the activation of the NLRP3 inflammasome. Here, NLRP3 is linked to endometritis.