In 1837, the Pirate Captain (Hugh Grant), inexpert in the ways of pirates, leads a close-knit, rag-tag group of amateur pirates who are trying to make a name for themselves on the high seas. To prove himself and his crew, the Pirate Captain enters the Pirate of the Year competition, with the winner being whoever can plunder the most. After several failed attempts to plunder mundane ships, the Pirate Captain talks with his best friend and first mate, the Pirate with a Scarf (Martin Freeman), about giving up and selling baby clothes as a living, but is convinced to try boarding the next ship they find, which happens to be the Beagle. They find no treasure but succeed in capturing Charles Darwin (David Tennant). Darwin recognizes the crew’s pet Polly as the last living dodo, and implores the Pirate Captain to enter it into the Scientist of the Year competition at the Royal Society in London for a valuable prize. The Pirate Captain directs his ship to London. The Pirates disguise themselves as Girl Scouts, so that they don’t get caught and executed, as Queen Victoria has a strong hatred of Pirates.
Darwin desires to win the Scientist prize on his own in order to impress Queen Victoria, on whom he has a crush. He uses Mr. Bobo, his trained chimpanzee, to try to steal Polly. The Pirate with the Scarf witnesses the kidnapping but the attempt goes awry after alerting the other pirates. Darwin gets off the hook, much to the Pirate with the Scarf’s frustration, but the Pirate Captain insists on hiding the bird and entering the competition on his own, disguising himself and the whole crew as scientists. The display of the dodo takes the top prize: a minuscule trophy, an Encyclopedia set and an opportunity to meet Queen Victoria (Imelda Staunton), who requests Polly for her petting zoo. During the ceremony, the Pirate Captain accidentally reveals his pirate identity, but Darwin convinces the Queen to spare the Captain’s life because he knows the location of Polly. The Queen lets the Captain go free with a full pardon, but orders Darwin to locate the dodo by any means necessary.
Darwin takes the Pirate Captain to a tavern, and the latter ultimately reveals that he had stashed Polly in his beard. Darwin and Mr. Bobo are able to capture Polly and are chased by the Captain up into the Tower of London, where the Queen is waiting. The Queen quickly dismisses Darwin and Mr. Bobo, and then offers the Pirate Captain a large amount of treasure in exchange for Polly. Soon, the Pirate Captain reunites with his crew with his newfound wealth, stating that Polly is sleeping within his beard, and sets off for the Pirate of the Year ceremony. The Pirate with a Scarf expresses doubt to the validity of the Captain’s story.
At the ceremony, the Pirate Captain wins the grand prize from the Pirate King (Brian Blessed), but rival pirate Black Bellamy (Jeremy Piven) makes the Queen’s pardon known to all pirates in attendance. The Captain is stripped of the prize, his plunder and his pirating licence, and banned from Blood Island. The crew also deserts him when they find out that he lied about Polly’s fate. The Captain returns alone to London to sell baby clothes, but soon becomes determined to free Polly. He re-encounters a now-devastated Darwin, who has learned that the Queen is part of a secret dining society with several other world leaders who are now aboard her steamship, the QV1, waiting to eat the most rarest and most endangered animals. According to the menu, the highlight of the year is: “dodo a l’orange”. The Pirate Captain enlists Darwin’s help to steal an airship presented at the science contest and rescue Polly.
Aboard the QV1, the Pirate Captain and Darwin disrupt the meal, and are soon joined by the rest of the Captain’s crew, who have been informed by Mr. Bobo of his need. The Queen locates them and attempts to kill both of them, but together they best her. In the battle, they accidentally mix the ship’s store of baking soda with vinegar, causing a violent reaction that rends the ship in two. The Pirate Captain rescues Polly and they escape safely, leaving behind a furious Queen. With his reputation among pirates restored because of the large bounty now on his head, the Pirate Captain and his crew continue to explore the high seas in search of adventure.
In a few post-credits scenes, they leave Darwin on the Galapagos Islands, Mr. Bobo joins the Captain’s crew, the Queen is left at the mercy of some of the rare animals she had planned on eating, and Black Bellamy is also forcefully stripped of his trophy by the Pirate King because of the Pirate Captain’s new infamy.