Sunday's "march of the Moroccan people" was organised by political and civil rights groups, as well as the families of detainees.
It comes weeks after a court upheld prison sentences for the activists, who held protests in 2016 and 2017.
Authorities accuse them of threatening the security of the country.
Protesters have been pictured with flags, banners and pictures of the jailed activists, who are members of Hirak Rif - or the "Rif Movement".
The demonstrations also called for the release of journalist Hamid El Mahdaoui, who is serving a three-year sentence for covering the protests in Morocco's northern Rif region.