This method to get migrants into the Spanish territory had not been used in years, but it happened once in March, and again on Friday and Saturday.
Melilla and its sister city Ceuta, some 400 kilometres (250 miles) northwest along the Moroccan coast, are the only two land borders between Africa and the European Union and migrants wanting to get to Europe often resort to desperate measures to get in.
The central government's representative office in Melilla said in a statement that the car came up to the border post normally, queueing with other vehicles.
"When it got near the first police control, it abruptly changed direction, took a lane adjacent to the one it was in and dangerously evaded police controls at high speed," it said.
The car damaged one of the border post's barriers and forced "officers to abandon their posts so as not (to) be run over," it added.
Once inside Melilla, the Moroccan driver abandoned the car but was soon detained by police.
Inside the vehicle, they found five migrants -- two in the boot, two others under a false bottom in the rear seats and another in the dashboard.
Three of them were minors.
The incident comes just a day after a another car forced its way through the Melilla border post with nine migrants on board.
Surveillance footage tweeted by Spain's interior minister showed a police officer rushing to close large gates at the border post but being flung to the floor as the car forced the barriers open at high speed.
The border between Morocco and Melilla and Ceuta is regularly hit by disturbances as migrants try to get through by hiding in vehicles or climbing over high fences at the frontier.
Spain announced in March that it would nearly double the capacity of its migrant reception centres in the two territories to 8,500 places from 4,500.
Migrants and refugees also regularly take to rickety boats to cross the Mediterranean between north Africa and Spain.