The boy, who has dual German-Iraqi citizenship, is the youngest to be seized in Europe for a suspected terror offence.
According to Focus Magazine the child was "strongly radicalised" in recent weeks by a member of the Islamic State and planned to detonate his nail bomb on November 26 but it failed to explode.
He, or someone else, had assembled a device made from gunpowder surrounded with nails and screws designed to cause maximum casualties when it went off.
He placed it in a thicket near the to the Ludwigshafen Christmas market – the city is home to former Chancellor Helmut Kohl, the great champion of the EU project – but it failed to go off.
He tried again on December 5, this time placing it in a thicket near the city hall, according to Focus.
An eagle-eyed passerby saw what he was doing and contacted police.
A specialist explosive squad was brought in to bring about a controlled explosion.
The boy, born in the city in 2004, was seized the same day and sits in juvenile detention.
Police in the city referred all media enquiries to the office of the German attorney general in Karlsruhe where there was no immediate comment.
According to Focus - known in Germany for a magazine with close ties to and sources within the security services - the bomb was in a glass jam jar and the nails and screws were glued to the sides.
The attempted slaughter illustrates the spiking terror threat in Germany.
Returnees from the ranks of Isis in the Middle East have told intelligence services that it is the group's main target in Europe.
Police investigators determined that the explosive material used in the child's bomb been created out of the ingredients of fireworks and sparklers and was flammable but not explosive.
Yesterday, in a separate case, prosecutors said that a Tunisian man suspected of planning an unspecified mission for Isis was arrested.
Charfeddine T., 24, allegedly joined Isis before he arrived in Germany in October 2015, the prosecutors' statement said.
They obtained an arrest warrant against him on Wednesday, accusing him of membership of a foreign terrorist organisation.
He had been in contact with an Isis member in Syria responsible for running the group's operations abroad and had "requested permission to carry out his mission”.
"Investigations so far have not confirmed whether it was to carry out an attack," said the federal prosecutors.