The grenades in Michael Borgwardt's answer are probably the earliest European examples, but in China they go much further back.
Fireworks based on a bamboo, clay or paper shell filled with an explosive mixture (a precursor of gunpowder) came into use as far back as around 600-700 BC (Tang Dynasty).
The Chinese kept improving fireworks and also developed bombs (in this shape) and rockets which culminated in the invention of classic gunpowder (black powder) around 1100 AD.
Eventually the stuff ended up in Europe through the Silk Road trade. That happened with early fireworks already in Roman times as archeological digs (the Pompeii museum displays some) have shown.
Also: The ancient Greeks already used a substance called "Greek fire" which was a highly flammable (to the point of being a weak explosive) pitch, resin and oil based mixture. Most likely it also had magnesium salts in it.
They would put it in jars which were thrown at enemy ships during combat. Fire-arrows would ignite the stuff.
They didn't use fuses. The stuff was dangerous enough without them if a sailor dropped a jar near his own brazier which he used for lighting the arrows.
Although not quite the same thing they are a bit similar to the classic cartoon-bomb.