If you are looking for a book like The Tale of Despereaux, you may like
Redwall by Brian Jacques.
The peaceful life of ancient Redwall Abbey is shattered by the arrival of an evil rat and his villainous hordes. Matthias, a young mouse, seeks the legendary sword of Martin the Warrior which he thinks will help Redwall's inhabitants destroy the enemy. This is the first of many books in the Redwall series.
Here is a possible match for City of Ember:
Gregor the Overlander by Suzanne Collins.