The emperor guy in the Mistborn series was one of those types of misunderstood hero kinds of people, too. (I forget his name, been too long since I read it.) Doing the best he knew how in order to keep the world alive, despite the brutality and repression he was causing to do it. And, of course, no one knew it until after they had killed him.