The rescue took place on Friday, with 158 men, 33 women and 14 children taken from three inflatable boats off the coast of Zawiyah, 45 kilometres west of the capital, a navy statement said.
After receiving calls for help, coast guards had found the boats between 45 and 50 nautical miles (83-93 kilometres) offshore, it said.
The migrants, who came from African nations including Mali, Ivory Coast and Guinea, were returned to port in east Tripoli where they were taken to a migrant detention centre.
Detention facilities for “rescued” migrants in Libya are often overcrowded, and where a lack of regulation means people face torture, sexual abuse and forced labour.
NGOs have campaigned against EU countries’ support for Libya’s coast guard, arguing that they it facilitates migrant interception operations which forces the return of those trying to escape war-torn Libya.
Their situation has deteriorated further after fighting broke out south of Tripoli in April, with forces loyal to eastern-based strongman Khalifa Haftar attempting to seize the capital from Libya’s unity government.
The battle has killed more than 1,000 people and displaced 120,000, according to the United Nations.
At least 53 people were killed in an airstrike on a migrant detention centre by Haftar-affiliated forces in July, in what the UN-backed government called a “premeditated” and “precise” attack.
Some 40,000 refugees and asylum-seekers also live outside detention centres in urban areas in Libya, according to the United Nations agency for refugees (UNHCR).
The chaos that followed the fall of dictator Moammar Gaddafi in 2011 led to Libya becoming a key transit route to Europe for migrants coming from the Sahel, east Africa and the Middle East.