They started running from the Moroccan side, crossed the border posts and reached Spanish soil, a spokesman for the Guardia Civil police force told AFP, in the latest incident there.
Ceuta and Melilla, another Spanish territory on Morocco's northern border, have the EU's only land borders with Africa.
As a result, they are entry points for migrants desperate to get to Europe and who regularly try to climb the high border fences, swim along the coast or hide in vehicles crossing the frontier.
The police spokesman, however, said this type of border-crossing attempt -- sprinting through manned posts -- was very rare.
"It's been a long time since we've had any attempt of this kind here," he said, adding that the migrants who reached Spanish soil were taken to a reception centre in Ceuta, which would later give the exact number of people who crossed across.
Last week in Ceuta, about 200 migrants stormed the high border fence, with 73 managing to get through using wire cutters and mallets.
Ceuta is ringed by a double wire fence eight kilometres (five miles) long. The six-metre high fence also has rolls of barbed wire.