The IS members were arrested in the cities of Tangier and Meknes, the Interior ministry said in a statement.
Initial investigations reveal that the cell members were plotting to join a branch of IS group, the Ministry said, adding that they also were involved in spreading terrorist propaganda.
The cell was planning attacks on civilians, damaging private property and undermining public order.
The probe also led to the seizure of various electronic devices and bladed weapons, in addition to apologetics of terrorism and extremism.
The suspects will be brought before justice for further investigation.
Moroccan authorities continued their unabated crackdown on terrorists in 2017 with the busting of nine terror cells and the arrest of 189 extremists and 20 returning foreign fighters.
The total number of terrorist cells dismantled in Morocco since the creation of the BCIJ in 2015 amounted to some 50 cells plotting to carry out attacks across the Kingdom.
Morocco has since 2015 arrested more than 92 Moroccan foreign fighters who joined terrorist groups abroad.