What’s Up With the Ending?

The author wraps things up pretty neatly. Princess Pea returns to her relieved father, Roscuro's allowed to go up to the castle, and Mig's reunited with her very sorry father, who makes sure that he shows his daughter love and compassion. And Despereaux and Princess Pea continue to grow their friendship:

And what of Despereaux? Did he live happily ever after? Well, he did not marry the princess, if that is what you mean by happily ever after. Even in a world as strange as this one, a mouse and a princess cannot marry.
But reader, they can be friends.
And they were. Together, they had many adventures. Those adventures, however, are another story, and this story, I'm afraid, must now draw to a close. (52.6-8)

The ending makes it clear that even though this is the end of the book, it's not the end of Despereaux and Princess Pea's adventures. They'll live out plenty of fun, exciting stories together. It's another message from the author about how much she loves stories.