The 19-year-old allegedly attacked the driver of a delivery truck at the bakery at 4:20am (0220 GMT), before smashing the shop's windows, local police and prosecutors said.
As police arrived on the scene, the young man flung stones at the officers.
Police subsequently opened fire, killing the man.
His motives, as well as the circumstances of the attack were as yet unclear, added authorities.
A spokesman for the prosecution service told AFP that there were currently no indications that the attack was due to political reasons.
In 2017, police in Hesse shot people in five cases, killing two people.