A suitcase containing aerosols detonated near a reception center for migrants in Zirndof, a town close to Nuremberg on Wednesday, German media reported.
There were no injuries in the incident and no danger to the surrounding area, local police wrote on Twitter.
A police statement said there was no evidence of an explosive device and a spray can in the suitcase may have exploded, adding that they were looking for the owners of the suitcase.
Witnesses had reported hearing a loud bang before finding a burning suitcase in an allotment garden, according to broadcaster Bayerischer Rundfunk.
Television images showed police standing near a partially destroyed suitcase lying in a small alley.