They were detained this week from a nearby warehouse where people smugglers had kept them before a planned sea crossing to Europe.
Abdulrazaq al-Shniti, from the authority to counter illegal immigration, spoke at the opening of a new detention centre in Tajoura, an eastern suburb of the capital Tripoli.
The new centre brings the total number of operational migrant detention centres in the country to 23, he said.
It already shelters 130 young African migrants, an official there said, after they were detained this week from a nearby warehouse where people smugglers had kept them before a planned sea crossing to Europe.
Shniti said the leaders of people-smuggling networks had been arrested recently and would soon be brought to justice.
He said illegal immigration into Libya took place because its southern borders were "completely open".
"If we can stop (migrants crossing) into the southern region, we will be able to limit illegal immigration," Shniti said.
Libya has long struggled to control its 5,000 kilometres (3,000 miles) of southern borders with Sudan, Chad and Niger, even before the 2011 uprising that toppled dictator Moamer Kadhafi.
The North African country has long been a stepping stone for migrants seeking to cross the Mediterranean for a better life in Europe.
But smugglers have stepped up their lucrative business in the post-uprising chaos, with tens of thousands of people each year making the perilous crossing to Italy just some 300 kilometres away.
In 2016, a record 181,000 migrants reached Italy, 90 percent of them from Libya.