She did promise Ser Davos that there would be no need to execute her, as she’d be dead by dawn.
It was bold of Melisandre to turn up at Winterfell when there were a number of people present who had reason to want her dead, including Ser Davos, who vowed to kill Melisandre if she returned because of what she did to Shireen.
She held true to that prediction; shortly before dawn broke, Melisandre exited Winterfell and removed her amulet, wasting away and finally dying for good.
She was instrumental in lighting the fire trench, and her words were what made Arya realize that it was up to her to kill the blue-eyed Night King.