The White Fox is Book 2 of The Emperor’s Foul Legacy.
Even a privileged palace boy gets punished if he tries to sneak into the room of Tarlin’s best wife. Olcish finds himself tending smelly old people in the infirmary and being bossed about by the priestesses.
But one of the old men dies and that changes everything, sending him to the worst place in the world with little chance of coming back. But by then he wants to go, even if it kills him.
This is the kind of story that has appendices and a map.