Shrek tells Artie they are going back to Far Far Away, and Artie hesitates because he fears he is not fit to rule. Charming meanwhile takes over the kingdom with an army of villains. Rapunzel betrays the princesses to be with him. The heroes are captured. Charming plans to kill Shrek on stage, but Shrek confesses that he had been using Artie to replace himself in order to save Artie's life. Artie, hurt, stalks off.
The princesses, led by Fiona and her mother, break out of prison, and Donkey and Puss free the other fairy-tale characters. They stage a rescue just as Charming is about to kill Shrek, but they are outnumbered and captured. Artie then returns and gives a speech persuading the villains that they are not defined by their reputations. They abandon Charming. Dragon's tail knocks Rapunzel's tower onto Charming, who cries for his mother.
Shrek offers Artie the crown as a free choice, and Artie accepts. Shrek then tells Fiona he has something more important in mind, her pregnancy, and the film ends with the ogre family and the babies. The ending shows that the story's real aim is Shrek's acceptance of fatherhood, not the throne.