When Macduff finds him, at first Macbeth is going to do what before he decides to fight to the end.
Macbeth wants to avoid Macduff. Macbeth has already killed his wife, child, and servants and burned his castle to the ground. Could it be that Macbeth feels *guilty* about spilling any more Macduff family blood? It seems Macbeth's superego has returned to him in Act V, after his wife's death, and before his own.
Not to mention that Macbeth fears Macduff based on the witches' prophecy: "Beward Macduff." Macbeth thought the other two subsequent prophecies ("None of woman born shall harm Macbeth" and "till Birnham wood come to Dunsinene") cancelled out the first one. Now, he knows all three have come true, and he's shaken.
After Macduff calls him a "coward" and a "tyrant," Macbeth resolves to fight till the end. Macbeth was first introduced in the play, by the Bleeding Captain, as a man of valor with steel: he gutted Macdonwald, unseamed him from the "nave to the chaps." Now it comes full circle: he will die by the sword. He tells Macduff:
Macbeth is beheaded, his head mounted on a spike, and the third of the traitors (Macdonwald, the first Thane of Cawdor, and now Macbeth) is executed.