Friday's crossing attempt took place early in the morning in the border town of Fnideq before security forces forced the migrants back, local authorities told AFP, alleging that they had been "armed with sticks, rocks and blades".
Fourteen members of the security forces and six migrants were injured during the operation that saw 70 arrested while trying to make the crossing, the same source said.
The injured were taken to a local hospital.
The attempt to reach Ceuta comes less than a year after at least 23 people died when around 2,000 migrants tried to cross the border between Morocco and the other Spanish enclave of Melilla.
Situated on Morocco's northern coast, Ceuta and its sister enclave of Melilla have long been a magnet for those desperate to escape grinding poverty and hunger.
They are the only European Union territories that share a border with the African continent, and have seen frequent attempts at illegal crossings by migrants in the North African country.
Although overall irregular migration rates to Spain dropped by 25 percent last year, clandestine crossings through the two enclaves rose by 24.1 percent, the Spanish interior ministry said in January.