The car ploughed into the crowded market via an emergency vehicle access lane about 19:00 local time (18:00 GMT) on Friday, police said.
Eyewitnesses described jumping out of the car's path, fleeing or hiding. Unverified social media footage showed the vehicle speeding through a pedestrian walkway between stalls.
Police said the driver then returned to the road and was forced to stop in traffic, where he was arrested.
Around 100 police, medics and firefighters attended the scene, according to city officials.
A 50-year-old man has been remanded in custody on suspicion of five counts of murder, multiple attempted murders and dangerous bodily harm, police said.
The suspect has been identified in local media as Taleb al-Abdulmohsen, a Saudi-born psychiatrist who arrived in Germany in 2006.
The motive behind the attack remains unclear but authorities say they believe the driver acted alone.
German authorities are facing questions about security after reports they were warned last year that the suspect could pose a threat.
The Saudi foreign ministry said it warned the German government about al-Abdulmohsen's extremist views, but received no response.
Later, the head of the Federal Criminal Police Office (BKA), Holger Münch, told public broadcaster ZDF that his office had received a notice from Saudi Arabia in November 2023. He said local police took appropriate investigative measures, but the matter was unspecific.
He added that the suspect "had various contacts with authorities, insulted them and even made threats, but he was not known for violent acts".
Past investigations would need to be revisited, Münch said.