The common fig tree has been cultivated since ancient times and grows wild in dry and sunny areas, with deep and fresh soil; also in rocky areas, from sea level to 1,700 metres. It prefers relatively light free-draining soils, and can grow in nutritionally poor soil.
The edible fig is one of the first plants that was cultivated by humans. Nine subfossil figs of a parthenocarpic (and therefore sterile) type dating to about 9400–9200 BC were found in the early Neolithic village Gilgal I (in the Jordan Valley, 13 km north of Jericho). The find precedes the domestication of wheat, barley, and legumes, and may thus be the first known instance of agriculture. It is proposed that this sterile but desirable type was planted and cultivated intentionally, one thousand years before the next crops were domesticated (wheat and rye).
Figs contain diverse phytochemicals under basic research for their potential biological properties, including polyphenols, such as gallic acid, chlorogenic acid, syringic acid, (+)-catechin, (−)-epicatechin and rutin. Fig color may vary between cultivars due to various concentrations of anthocyanins, with cyanidin-3-O-rutinoside having particularly high content.