When King Harold (John Cleese) of Far, Far Away dies, the clumsy Shrek (Mike Myers) becomes the immediate successor of the throne. However, Shrek decides to find the legitimate heir Artie (Justin Timberlake) in a distant kingdom with his friends Donkey (Eddie Murphy) and Puss in Boots (Antonio Banderas) to be able return to his beloved house in the swamp with the pregnant Fiona (Cameron Diaz). Meanwhile, the envious and ambitious Prince Charming (Rupert Everett) joins the villains of the fairytales plotting a coup d'état to become the new King.When his new father-in-law, King Harold falls ill, Shrek is looked at as the heir to the land of Far, Far Away. Not one to give up his beloved swamp, Shrek recruits his friends Donkey and Puss in Boots to install the rebellious Artie as the new king. Princess Fiona, however, rallies a band of royal girlfriends to fend off a coup d'etat by the jilted Prince Charming.