Morocco's Interior Ministry said 13 people were arrested in raids in several cities across the country, including Nador and Hoceima on the Mediterranean coast close to the Spanish enclave of Melilla, as well as Fez and Casablanca.
One of those detained had previously been arrested under the country's anti-terror law.
A Spanish Interior Ministry statement said one person was arrested in the central town of San Martin de la Vega, just southeast of Madrid.
Both ministries said the network was aimed at recruiting fighters for the Islamic State to fight in Syria and Iraq and also to carry out IS-type actions in Morocco and Spain.
More From This Section
Moroccan and Spanish authorities have previously carried out joint operations focused on the two Spanish enclaves in North Africa, Melilla and Ceuta, and the surrounding Moroccan cities.
A heavily armed Moroccan, originally form the northern city of Tetouan, was subdued on a high- speed passenger train on Friday as it passed through Belgium, but there were no indications the raids were connected to that case.
He added that 30 networks have been dismantled in the past two years, 12 of those just in the past six months.
Spanish police have arrested some 50 suspected jihadi militants and recruiters so far this year.
Interior Minister Jorge Fernandez Diaz said last month that 126 people had left Spain to join the Islamic State group in recent years. Of these, he said 25 had been killed and 61 remained abroad.
Spain said the continual dismantling of cells showed the Islamic group's determination to attack those countries it considers enemies.