The story takes place in England in the year 1547. The main characters are Tom Canty, a beggar child who has known nothing but poverty his entire life, and Edward the Prince of Wales, the only son of King Henry VIII who later becomes King Edward VI of England. The two boys change places by accident. They are both considered mad at first, Edward for claiming that he is the Prince of Wales, although he is dressed in rags, and Tom for claiming that he is not the Prince of Wales. Tom quickly adapts to life as a prince. Edward has much more difficulty adapting to his new life but is profoundly influenced by the injustices that he sees in his father's kingdom.
In a preface, Twain says that the story that he is writing was passed down from father to son for three hundred years. He does not know if it is history or legend, saying, "It may have happened. It may not have happened but it COULD have happened."
The novel begins by saying that Tom Canty and Prince Edward are born on the same day. Tom grows up in a slum called Offal Court with his two sisters, his parents and his grandmother. His parents are both beggars and thieves. His father and his grandmother are frequently drunk and both beat Tom regularly. Tom and his sisters agree to become beggars but refuse to steal. Tom is taught to read and write and to speak a little Latin by a kindly priest. He reads fairy tales and longs to meet a real prince.
One day, Tom walks farther than he has ever walked before and arrives at the royal palace. He tries to go inside its grounds but a guard roughly pushes him away. Prince Edward sees this and orders the soldier to let the boy enter. The two boys talk. They change clothes because Tom admires the prince's fine garments and Edward believes that it will make Tom happy to wear them for a short while. At that point, they notice how remarkably similar they look. Edward sees a bruise on Tom's head. He goes to reprimand the soldier who beat his new friend but, being dressed as a beggar, he is beaten and thrown out of the palace. When he protests that he is the Prince of Wales, the guards merely think that he is crazy.
Edward struggles to survive amongst England's poor. He is taken home by Tom's abusive family and later escapes from them. He comes under the protection of Miles Hendon, a man from a noble family. Hendon initially thinks that the boy is mad and is suffering from the delusion that he is the Prince of Wales. When Hendon's younger brother Hugh, who has replaced him as master of Hendon Hall, pretends not to know him and insists that Miles Hendon is dead, Hendon begins to see that the boy's story is plausible.
Although Tom initially protests that he is not the Prince of Wales, and is considered mad for doing so, he comes to enjoy life as a royal. When King Henry VIII dies, Tom is proclaimed the king of England. Edward knows that he has to prevent Tom from being crowned. He arrives at Westminster Abbey at the moment that the crown is about to be placed on Tom's head. Tom admits that he is not the true king and that Edward is. Edward is forced to prove that he is the true king by saying where the Great Seal of England can be found. When the seal is not found where Edward says it is, Tom explains that he took it and used it as a nutcracker. At that point, there is no longer any doubt amongst the laughing courtiers that Tom is not the rightful king.
Tom Canty and Miles Hendon remain at the Court as favorites of the king. The novel concludes by saying that, as a result of the injustices that he suffered during his time as a pauper, the brief "reign of Edward VI was a singularly merciful one for those times."
The Prince and the Pauper has been adapted for the stage, radio and television. It has been made into comic books and animated cartoons. There have been numerous movies and TV series episodes that have been very loosely based on Twain's novel, taking the basic idea of two people from completely different social backgrounds trading places with each other.
The first screen adaptation of the novel, Der Prinz und de Bettelknabe, was a much abridged silent movie produced in Austria in 1920.
The 1937 Hollywood movie version of the story stars Errol Flynn as Miles Hendon and twin brothers Billy and Bob Mauch as Tom Canty and Prince Edward.
Following the success of two English-language movies from Panama based on The Three Musketeers, The Prince and the Pauper was adapted into a Panamanian movie in1977. The movie, directed by Richard Lester, was released as The Prince and the Pauper in the United Kingdom but as Crossed Swords in the United States. It stars Mark Lester as both Tom Canty and Prince Edward, Oliver Reed as Miles Hendon and Raquel Welch as Lady Edith, Miles Hendon's former sweetheart who marries his brother Hugh because she believes her lover to be dead. The movie is notable for featuring several well-known British and American actors in supporting roles, for example, Charlton Heston makes a brief appearance as King Henry VIII.