An initial group of six suspects, aged between 22 and 28, were "supporters" of IS and suspected of planning "terrorist acts", the central bureau of investigations said in a statement.
They were arrested in the coastal town of Sale, near Rabat, in a raid led by the bureau's anti-terrorism squad.
Electronic devices, bladed weapons and "extremist" documents, were found during the raid, it said.
Investigators later said a seventh person had been arrested in the Western Sahara town of Dakhla on suspicion of links with the Sale detainees.
Morocco has been spared large-scale jihadist attacks since a 2011 bombing in Marrakesh's famed Jamaa El Fna Square that killed 17 people, mainly European tourists.
But authorities regularly announce they have dismantled IS cells.
Suspected jihadists are to go on trial in Sale next week for the murder of two Scandinavian women in Morocco's High Atlas mountains last December.
Follow us on Twitter: @The_NewArab