King Solomon was a human who possessed enough power to become a demon king, therefore he was given authority to choose who would become the ruler of the demon world.
William is told by Dantalion that he harbors Solomon's soul.