Petroleum, in one form or another, has been used since ancient times. More than 4300 years ago, bitumen was mentioned when the Sumerians used it to make boats. A tablet of the legend of the birth of Sargon of Akkad mentions a basket which was closed by straw and bitumen. More than 4000 years ago, according to Herodotus and Diodorus Siculus, asphalt was used in the construction of the walls and towers of Babylon; there were oil pits near Ardericca and Babylon, and a pitch spring on Zakynthos. Great quantities of it were found on the banks of the river Issus, one of the tributaries of the Euphrates. Ancient Persian tablets indicate the medicinal and lighting uses of petroleum in the upper levels of their society.
The use of petroleum in ancient China dates back to more than 2000 years ago. The I Ching, one of the earliest Chinese writings, cites that oil in its raw state, without refining, was first discovered, extracted, and used in China in the first century BCE. In addition, the Chinese were the first to record the use of petroleum as fuel as early as the fourth century BCE. By 347 CE, oil was produced from bamboo-drilled wells in China.
In the 7th century, petroleum was among the essential ingredients for Greek fire, an incendiary projectile weapon that was used by Byzantine Greeks against Arab ships, which were then attacking Constantinople. Crude oil was also distilled by Persian chemists, with clear descriptions given in Arabic handbooks such as those of Abu Bakr al-Razi (Rhazes). The streets of Baghdad were paved with tar, derived from petroleum that became accessible from natural fields in the region. 
In the 9th century, oil fields were exploited in the area around modern Baku, Azerbaijan. These fields were described by the Arab geographer Abu Bakr al-Razi in the 10th century, and by Marco Polo in the 13th century, who described the output of those wells as hundreds of shiploads. Arab and Persian chemists also distilled crude oil to produce flammable products for military purposes. Through Islamic Spain, distillation became available in Western Europe by the 12th century. It has also been present in Romania since the 13th century, being recorded as păcură.
Sophisticated oil pits,  deep, were dug by the Seneca people and other Iroquois in Western Pennsylvania as early as 1415–1450. The French General Louis-Joseph de Montcalm encountered Seneca using petroleum for ceremonial fires and as a healing lotion during a visit to Fort Duquesne in 1750.
Early British explorers to Myanmar documented a flourishing oil extraction industry based in Yenangyaung that, in 1795, had hundreds of hand-dug wells under production.
Merkwiller-Pechelbronn is said to be the first European site where petroleum has been explored and used. The still active Erdpechquelle, a spring where petroleum appears mixed with water has been used since 1498, notably for medical purposes.