Incendiary and flaming weapons were used in warfare for centuries before Greek fire was invented. They included a number of sulfur-, petroleum-, and bitumen-based mixtures. Incendiary arrows and pots containing combustible substances surrounded by caltrops or spikes, or launched by catapults, were used as early as the 9th century BC by the Assyrians and were extensively used in the Greco-Roman world as well. Furthermore, Thucydides mentions that in the siege of Delium in 424 BC a long tube on wheels was used which blew flames forward using a large bellows. The Roman author Julius Africanus, writing in the 3rd Century AD, records a mixture that ignited from adequate heat and intense sunlight, used in grenades or night attacks:
Automatic fire also by the following formula. This is the recipe: take equal amounts of sulphur, rock salt, ashes, thunder stone, and pyrite and pound fine in a black mortar at midday sun. Also in equal amounts of each ingredient mix together black mulberry resin and Zakynthian asphault, the latter in a liquid form and free-flowing, resulting in a product that is sooty colored. Then add to the asphalt the tiniest amount of quicklime. But because the sun is at its zenith, one must pound it carefully and protect the face, for it will ignite suddenly. When it catches fire, one should seal it in some sort of copper receptacle; in this way you will have it available in a box, without exposing it to the sun. If you should wish to ignite enemy armaments, you will smear it on in the evening, either on the armaments or some other object, but in secret; when the sun comes up, everything will be burnt up.
In naval warfare, the Eastern Roman Emperor Anastasius I (r. 491–518) is recorded by chronicler John Malalas to have been advised by a philosopher from Athens called Proclus to use sulfur to burn the ships of Vitalianus. Greek fire proper, however, was developed in c. 672 and is ascribed by the chronicler Theophanes to Kallinikos (Latinized Callinicus), an architect from Heliopolis in the former province of Phoenice, by then overrun by the Muslim conquests:
At that time Kallinikos, an artificer from Heliopolis, fled to the Romans. He had devised a sea fire which ignited the Arab ships and burned them with all hands. Thus it was that the Romans returned with victory and discovered the sea fire.
The accuracy and exact chronology of this account is open to question: Theophanes reports the use of fire-carrying and siphōn-equipped ships by the Byzantines a couple of years before the supposed arrival of Kallinikos at Constantinople. If this is not due to chronological confusion of the events of the siege, it may suggest that Kallinikos merely introduced an improved version of an established weapon. The historian James Partington further thinks it likely that Greek fire was not in fact the creation of any single person but "invented by chemists in Constantinople who had inherited the discoveries of the Alexandrian chemical school." Indeed, the 11th-century chronicler George Kedrenos records that Kallinikos came from Heliopolis in Egypt, but most scholars reject this as an error. Kedrenos also records the story, considered rather implausible by modern scholars, that Kallinikos' descendants, a family called Lampros, "brilliant," kept the secret of the fire's manufacture and continued doing so to Kedrenos' time.
Kallinikos' development of Greek fire came at a critical moment in the Byzantine Empire's history: weakened by its long wars with Sassanid Persia, the Byzantines had been unable to effectively resist the onslaught of the Muslim conquests. Within a generation, Syria, Palestine, and Egypt had fallen to the Arabs, who in c. 672 set out to conquer the imperial capital of Constantinople. Greek fire was used to great effect against the Muslim fleets, helping to repel the Muslims at the first and second Arab sieges of the city. Records of its use in later naval battles against the Saracens are more sporadic, but it did secure a number of victories, especially in the phase of Byzantine expansion in the late 9th and early 10th centuries. Utilisation of the substance was prominent in Byzantine civil wars, chiefly the revolt of the thematic fleets in 727 and the large-scale rebellion led by Thomas the Slav in 821–823. In both cases, the rebel fleets were defeated by the Constantinopolitan Imperial Fleet through the use of Greek fire. The Byzantines also used the weapon to devastating effect against the various Rus' raids on the Bosporus, especially those of 941 and 1043, as well as during the Bulgarian war of 970–971, when the fire-carrying Byzantine ships blockaded the Danube.
The importance placed on Greek fire during the Empire's struggle against the Arabs would lead to its discovery being ascribed to divine intervention. The Emperor Constantine Porphyrogennetos (r. 945–959), in his book De Administrando Imperio, admonishes his son and heir, Romanos II (r. 959–963), to never reveal the secrets of its composition, as it was "shown and revealed by an angel to the great and holy first Christian emperor Constantine" and that the angel bound him "not to prepare this fire but for Christians, and only in the imperial city." As a warning, he adds that one official, who was bribed into handing some of it over to the Empire's enemies, was struck down by a "flame from heaven" as he was about to enter a church. As the latter incident demonstrates, the Byzantines could not avoid capture of their precious secret weapon: the Arabs captured at least one fireship intact in 827, and the Bulgars captured several siphōns and much of the substance itself in 812/814. This, however, was apparently not enough to allow their enemies to copy it (see below). The Arabs, for instance, employed a variety of incendiary substances similar to the Byzantine weapon, but they were never able to copy the Byzantine method of deployment by siphōn, and used catapults and grenades instead.
Greek fire continued to be mentioned during the 12th century, and Anna Komnene gives a vivid description of its use in a naval battle against the Pisans in 1099. However, although the use of hastily improvised fireships is mentioned during the 1203 siege of Constantinople by the Fourth Crusade, no report confirms the use of the actual Greek fire. This might be because of the general disarmament of the Empire in the 20 years leading up to the sacking, or because the Byzantines had lost access to the areas where the primary ingredients were to be found, or even perhaps because the secret had been lost over time.
Records of a 13th-century event in which "Greek fire" was used by the Saracens against the Crusaders can be read through the Memoirs of the Lord of Joinville during the Seventh Crusade. One description of the memoir says "the tail of fire that trailed behind it was as big as a great spear; and it made such a noise as it came, that it sounded like the thunder of heaven. It looked like a dragon flying through the air. Such a bright light did it cast, that one could see all over the camp as though it were day, by reason of the great mass of fire, and the brilliance of the light that it shed."
In the 19th century, it is reported that an Armenian by the name of Kavafian approached the government of the Ottoman Empire with a new type of Greek fire he claimed to have developed. Kavafian refused to reveal its composition when asked by the government, insisting that he be placed in command of its use during naval engagements. Not long after this, he was poisoned by imperial authorities, without their ever having found out his secret.