But he warned international powers not to "stoke the fires of conflict" in the country.
Ban was speaking in Mauritania before heading to Algeria today as part of a tour of West and North Africa.
While meeting Mauritanian leaders, including President Mohamed Ould Abdel Aziz and Prime Minister Yahya Ould Hademine, in the capital Nouakchott yesterday he said he was "deeply concerned about the situation in Libya".
The internationally recognised government is based in the far east of the North African country.
More From This Section
The Islamic State group and other extremist organisations have exploited the power vacuum, making gains along the oil- rich coastal regions and triggering concern among Western nations over jihadists controlling territory just 300 kilometres from Europe.
"There are alarming reports of widespread human rights violations, including serious abuses that may amount to war crimes," Ban said in his comments yesterday.
Ban said that his special representative Martin Kobler "is facilitating talks on a national unity government" as "we face the terrifying scourge of Daesh (IS) expanding in Libya and beyond its borders."
Delays would only worsen the dire humanitarian needs, he warned, adding that "Libya's future is at stake" and "the reverberations echo far".
Success in stabilising Libya would also benefit the whole Sahel region and "our world" in general, he added.
"Making progress on the situation in Western Sahara is also of importance here too," he said, referring to Mauritania. "Numerous refugees share the same culture and family ties with Mauritanians.