"The Great Migration" started in the year 226 by the order of King Lunshire, when the sun started to decay, in an attempt to save the human race, and finished five years later when the sun disappeared completely.
During the migration all the conflicts that existed between the races dissolved, all of them working for one common scope: survival.
The whole migration took place in some old Dwarven mines. The Dwarves also helped construct the city, but isolated themselves at lower levels after the migration was completed, away from contact with other creatures.
The Sisters of Edurneum also had a big impact on the migration. They created special plants that can grow underground, without the need of the sun.
It is revealed at the end of Arx Fatalis that the sun never truly disappeared, but became obscured by a cloud of debris in outer space. As such, it is possible that the debris could clear in the future and thus allow life to return to Arx's surface.