The Shadow King is allegedly a multiversal manifestation of the dark side of human consciousness, spawned by the first nightmare, which wished to bring mass death and destruction to all of existence. At some point in the past, the Shadow King fought against an Egyptian priestess by the name of Ashake.
When the mutant Amahl Farouk lost his father and the market he lived in, the Shadow King appeared to him and promised him that he would never be alone again. Amahl accepted the deal and bonded with the Shadow King.
Shortly before World War II, Amahl Farouk worked with Baron von Strucker on a plot to destabilize Britain's political structure, with the intention being Britain allying with Germany in the coming war, or at the very least, staying neutral. He first learned of his future enemies, the X-Men and Charles Xavier, and other future history at this time.