Spokesman Ayoub Gassim said a rubber boat carrying the migrants, mostly from Africa, stopped on Tuesday off the coast of the western town of Khoms.
He said the migrants were given humanitarian and medical aid before they were taken to a refugee centre in the port city.
After the 2011 uprising that toppled and killed long-standing President Moammar Gadhafi, the North African country has become a major conduit for African migrants and refugees fleeing to Europe.
Traffickers as well as armed groups have exploited Libya’s political turmoil following the uprising.
Libyan authorities, with European assistance, stepped up efforts to put an end to the flow of migrants.
The European block has given tens of millions of euros to support the Libyan coastguard, who are tasked with intercepting boats full of migrants and refugees and returning them to land, where they are then detained.
There are nearly 6,000 refugees and migrants currently being held in detention camps in Libya. More than 2,700 are in areas affected by clashes, according to the UN.
Migrants and refugees were also shot at indiscriminately by Haftar’s forces last week. At least ten people were seriously wounded, according to detainees.
At least 278 people have been killed so far in the battle over Tripoli, according to the World Health Organisation (WHO).
At least 35,000 people have been forced to flee their homes, according to the UN.
On Sunday, Pope Francis appealed for the evacuation of women, children and sick migrants trapped in Libyan detention centres as soon as possible through humanitarian corridors.
During his Regina Coeli prayer, the pontiff said the refugees’ situation, “which is already very serious, has become even more dangerous due to the ongoing conflict”.