The Shadow King's origins are unclear, all we know is that he was living in Morocco until the 1800s before taking Farouk as a host. It is a multiversal manifestation of the dark side of the human consciousnesses, spawned by the first nightmare. When Amahl Farouk's powers developed he psychically controlled those around him, feeding on the shadows in their souls and merging with the Shadow King (who had transferred from host to host since the dawn of humanity).[2]