Before he entered the university, he was summoned to another world as a hero, but with the previous King Albert's authoritative pronouncement he became the King of Elfrieden.
(Source: Genjitsu Shugi Yuusha no Oukoku Saikenki Wiki)
However, as the series goes on, it is shown that he isn't as rational as he is made to be believed, including not using confession magic (especially on corrupted nobles or slaves who didn't commit crimes but were tricked), not using broadcast magic to teach basic education, and having a massive emotional reaction (of rejection) if one of his lovers asks for sexual intimacy.