“Bodies of 15 persons recovered as 2 boats arrived at Tripoli Naval Base this evening,” UNHCR Libya tweeted.
“The passengers had set off from Zwara and Alkhoms the night before,” it added.
The agency said 177 survivors were receiving aid and medical attention from the UNHCR and its parners.
It tweeted images showing survivors arriving at the base, huddled under blankets.
The incident is the latest in a series of shipwrecks and deaths off the coast of the North African country.
Libya is a major point of departure for desperate migrants seeking to reach Europe, many of them from sub-Saharan African countries.
Tens of thousands board unseaworthy boats every year in attempts to reach Italian shores 300 kilometres (190 miles) away.
At least 1,010 migrants died at sea en route to Europe between the start of the year and the end of August, up from 398 during the same period last year, according to figures published by the International Organization for Migration (IOM).
The latest deaths come days after six migrants were shot dead at an overcrowded detention facility in Tripoli following mass arrests targeting migrants.
Doctors without Borders (MSF) said 5,000 migrants and refugees had been swept up in “violent mass arrests” and detained in squalid conditions.
Libyan migrant detention centres have often come under criticism from UN agencies and human rights groups due to the prevalence of violence, sexual assalt and corruption.