The Turkish-flagged ship's activities had been monitored for a long time and migrants were seen boarding the vessel in western Turkey's Izmir province on Monday evening, the coastguard statement said.
It said an operation including coastguard vessels and police teams was launched. The migrants were from countries including Syria, Iran, Afghanistan, Bangladesh and Somalia, state-owned Anadolu news agency reported.
Photographs distributed by the coastguard showed security force members watching over those detained in the ship, most apparently wearing face masks to protect against coronavirus.
Members of Turkish Coast Guard Command stand guard next to migrants on the deck of a cargo ship during a raid in the Aegean port city of Izmir, Turkey July 7, 2020. Turkish Coast Guard Command/Handout via REUTERS
At the end of February, Turkey said it would no longer try to stop people crossing the border into Europe, prompting tens of thousands of migrants to try to cross into Greece via land and sea.
The flow slowed as the new coronavirus spread, but Foreign Minister Mevlut Cavusoglu said on Monday that Turkey would "continue to implement its decision" regarding migrants who want to leave the country.
There are some 3.6 million Syrians in Turkey, the world's largest refugee population.