Despereaux is a mouse whose mother immediately complains about him being a disappointment; he is extremely small, has giant ears, and was born with his eyes open. Despereaux’s brother, Furlough, and his sister, Merlot, try to teach Despereaux to be a normal mouse, but there is just something different about him. Despereaux’s family quickly gives up on educating him to be a mouse.
Despereaux is left on his own, and wanders towards the beautiful sound of music. He becomes so entranced by the music that he follows it straight to the foot of the King, and Princess Pea. Despereaux falls in love at the first sight of Pea. He lets Pea scratch his ears and he even speaks to the royals. After Furlough witnesses this encounter between the humans and Despereaux, he runs to tell their father, who calls the Mouse Council to discuss the matter.
The Council determines Despereaux is a threat to the community and announces that he will be sent to the rat dungeon. Despereaux is given an opportunity to recant his feelings toward the humans, but he refuses. Instead, he bravely proclaims his love for Pea.
Despereaux is thrown into the dark dungeon, where he meets Gregory, an old jailor who saves him from the rats in exchange for a story.
The narrator goes back in time to introduce a rat named Chiaroscuro, or Roscuro. Roscuro is enamored with light and talks with the wise rat, Botticelli Remorso, about his curiosity. Botticelli tells Roscuro that he is a rat, and a rat’s purpose in life is to torture prisoners. Remorso tortures the next prisoner that arrives, but he is disappointed; he believes light is the true purpose of life and decides to go upstairs.
Roscuro explores a little of the upstairs, but interrupts a party by falling into the Queen’s soup. The Queen falls backward to her death and Roscuro catches the look of anger and hatred from Pea, which breaks his heart. Roscuro returns to the dungeon to plan his revenge on Princess Pea.
The narrator introduces Miggery Sow, the daughter of a prisoner, who was sold for a red tablecloth, a hen, and a pack of cigarettes. Miggery served as a slave to the man who bought her, whom she called “Uncle”. Uncle continually hit her in the ear, to the point where she became partially deaf.
On day, Miggery sees the princess pass by, and decides she wants nothing more than to be a princess with a crown and a white horse. The King’s soldier enters Uncle’s home to declare soup illegal. He also states that owning another person is illegal and takes Miggery to the castle. Miggery becomes a servant at the castle, but she can’t perform any of the tasks correctly, so the Cook sends her to feed prisoners in the dungeon. As Miggery is serving Gregory his food, she talks about her dream of being a princess. Roscuro is delighted at hearing this; he stops Miggery and explains his plan to bring the princess down to the darkness. In return for her help, he promises Miggery she can become the princess.
Miggery brings the tray back to the kitchen, but Gregory had sneaked Despereaux onto the tray. When he is discovered, the Cook demands that Miggery kill the mouse. Miggery cuts off Despereaux’s tail, but he gets away. In a great deal of pain and feeling a mixture of joy, gratitude, and despair, Despereaux weeps and falls asleep for a long, long time.
While Despereaux sleeps, Roscuro’s plan goes into effect: Roscuro chewed through Gregory’s rope, leaving Gregory lost in the maze of the dungeon, and Miggery climbed upstairs to the princess’s room with a knife. Miggery believes that she and the princess will just switch places; however, Roscuro’s true plan is to lock Pea in the dungeon forever.
Miggery wakes Pea from a dream about her mother and demands that she comes with her, but Pea does not go easily. Roscuro insists that the Pea listen to his directions or Miggery will use the knife on her. After these threats, the three make their way into the dungeon.
Despereaux finally wakes to find the princess has already been kidnapped. Despereaux goes to the king to tell him what he knows about Pea’s disappearance, but the king is too stubborn to listen, and Despereaux is left with no choice but act like a knight in shining armor and rescue Pea himself.
Newly armed with a sewing needle and a spool of thread, Despereaux makes his way to the dungeon. He is caught by the Cook in the kitchen, but the Cook, who was cooking (illegal) soup, decides to feed Despereaux the delicious soup instead of kill him. She lets Despereaux go on his way down the dungeon stairs.
At the bottom, Despereaux is stopped by Botticelli. With no other choice Despereaux is guided through the dungeon by Botticelli, and arrives to find Miggery and the princess sitting together.
He runs towards them, but Roscuro blocks his way. Despereaux threatens to kill Roscuro. Botticelli and the other rats laugh at the idea of a mouse killing a rat, and watch in anticipation of the mouse’s death.
Despereaux’s whiskers brush against Roscuro and Roscuro is all of a sudden overcome with the smell of soup. He breaks down into tears and realizes that his plan will never work; all he really wanted was some light and beauty in his life and that was his reason for kidnapping the princess. Pea promises Roscuro some soup if he would let them all go.
The story has a fairy tale ending: Roscuro is allowed to move freely from the darkness of the dungeon to the light of the upstairs. Miggery Sow’s father is released and treats Miggery like a princess for the rest of his life. Despereaux became friends with Pea and has the seat of honor next to the princess. Despereaux’s parents, brother, and Hovis look on from a small crevice in the wall and see that Despereaux is alive and happy.