Its actual origins are obscure, but the earliest records of it date from 9th century China. These records tell of Chinese alchemists searching for an elixir of life who first stumbled across what we know today as sodium and potassium nitrate.
Nitrates react rapidly and violently when burned and are the key ingredient in what would come to be known as gunpowder. The Chinese didn't quite know what to make of this new and volatile substance. One early account reported this experiment: "some have heated together the saltpeter, sulfur and carbon of charcoal with honey; smoke and flames result, so that their hands and faces have been burnt, and even the whole house burnt down." For over a hundred years this early form of gunpowder remained primarily a source of amusement used in the creation of early fireworks and magicians tricks.
Regardless of its humble origins, gunpowder was the first explosive chemical propellant recorded in history.