The man had travelled to Syria with one of the Paris suicide bombers, where he received military training and built relationships with IS field commanders, "including the mastermind" of the Paris attacks, and others who threatened attacks in France and Belgium, the ministry said in a statement.
The statement identified the suspect only by the initials J A, and did not explain his suspected relationship to the Paris attackers.
The ministry said in a statement that the man was arrested Friday in the town of Mohammedia, near Casablanca, after travelling through Turkey, Germany, the Netherlands and Belgium.
It said the suspect is under investigation. Belgian prosecutors didn't immediately comment on the arrest. At least one of the Paris attackers remains at large.
More From This Section
Morocco has emerged as a key ally for European investigators trying to piece together the geography of the November 13 attacks.
Several of the attackers lived in the Brussels neighbourhood of Molenbeek, home to numerous Belgians of Moroccan descent.