The suspects were part of a "network of recruitment, indoctrination and sending foreign fighters to fight for Daesh (Islamic State) in the regions of Syria and Iraq under its control," the ministry said in a statement.
The statement said arrests "in the last few hours" were part of a joint operation between the two countries in the Spanish cities of Toledo, Badalona, Xeraco, and in Casablanca, Morocco.
Spain and Morocco joined forces on August 25 in another operation that saw 14 other alleged recruiters arrested.
More than 100 people from Spain are suspected of having joined jihadist fighters in Iraq and Syria and authorities fear they may return to launch attacks.
In a major crackdown on jihadists, including those operating online, Spanish police have arrested scores of suspected recruiters in recent years.