The migrants had been detained after some 2,000 people stormed the frontier of the Spanish enclave of Melilla on June 24 in a bid to reach European Union territory.
Border guards on both sides responded with what rights groups said was excessive force, leaving at least 23 migrants dead — the worst toll in years of such attempted crossings.
The 15 were latest batch of dozens of migrants jailed over the tragedy. No officials have faced trial over the affair.
Eight of the migrants were sentenced to three years in prison while the other seven received two years, in a ruling issued overnight by the court in the border town of Nador.
They had been found guilty of "illegal entry onto Moroccan soil" and "violence against law enforcement officers" and resisting arrest, said lawyer Mbarek Bouirig, adding that they would appeal.
The AMDH rights group, which says as many as 27 migrants were killed in the tragedy, said the ruling was "severe in order to create fear. Migrants need to be protected, not made to fear."
The June disaster followed days of clashes between Moroccan security forces in a forest near Melilla where migrants often spend months living rough before attempting to cross the heavily fortified barrier.
Since the tragedy, Morocco has sentenced dozens of migrants to prison terms on charges including illegal entry and belonging to criminal gangs. Nador's top court has systematically issued even heavier penalties on appeal.
The Spanish enclaves of Melilla and Ceuta have long been a magnet for people fleeing violence and poverty across Africa to seek refuge in Europe.