Pyramids, by Terry Pratchett, depicts the life of a young pharaoh's struggle to change his home and save it from another dimension. Through the course of the story he will become an assassin, a king, and then leave to find his own way.
Pyramids: The Book of Going Forth