The group were planning to leave from the kingdom's southern coast, which lies some 100 kilometers from Spain's Canary Islands, the DGSN security service said.
At least 11,500 migrants made their way to the Canary Islands this year, according to Spain.
Caminando Fronteras, a Spanish group that helps migrant boats in trouble at sea and families searching for missing relatives, says 978 people have died while trying to reach Spain so far this year.
Moroccan police have arrested dozens of migrants as well as several people smugglers since June, when some 2,000 mostly Sudanese nationals tried to enter the Spanish enclave of Melilla.
At least 23 people died in the attempt, the worst toll in years of such attempted crossings, and rights groups accused both Spanish and Moroccan authorities of using excessive force.
The Spanish enclaves of Melilla and Ceuta have long been a magnet for people fleeing violence and poverty across Africa hoping to find a better life in Europe.