Moroccan authorities said late on Friday that 18 migrants had died, some from falling from a high fence while others were crushed after what they called a stampede.
The video footage of the entry attempt, which Reuters was not immediately able to verify, was shared by AMDH, a Moroccan rights group that works with migrants in parts of northern Morocco including areas surrounding the Melilla enclave
The local office of AMDH put the death toll at 27, without giving details on its information.
Some 2,000 migrants had tried to storm the enclave fence to cross into Spanish territory, sparking two hours of violent clashes with security forces and border guards, Spanish and Moroccan authorities said, in which scores were also injured.
One video clip shared by AMDH showed a large number of African migrants lying closely piled together, their bodies overlapping, many motionless and a few making feeble gestures, with Moroccan security forces standing over them in riot gear.
The same clip showed security forces pulling two bleeding and dazed-looking migrants past those lying on the ground.
Another clip shared by AMDH showed a Moroccan security officer striking one of several migrants lying prone next to a metal fence.
Moroccan authorities said 140 members of the Moroccan security forces were also injured, five seriously, though none died.
A spokesman for the Spanish government in Melilla said no one had died on the Spanish side of the border, where 57 migrants and 49 police officers were injured.