Humans have probably employed spices since we first began to cook with fire. After all, spices are just the seeds of naturally-occurring trees and plants. In Europe we know of juniper berries and mustard seeds from neolithic burials. However, most of the best-known spices derive either from the East (India and South-east Asia) or from the New World (Mexico and the Caribbean). Many of these spices (think of pepper and chillies) have become so ubiquitous that it's difficult to reconcile the fact that until very recently they were rare and expensive commodities.
Indeed, the history of commerce and trade is the history of spices and it's no exaggeration to say that America would not have been discovered were it not for the European desire to break the Arab traders' monopoly on spices. But to understand the spice trade we need to go back to its origins, which can actually be traced back five thousand years in the historical records (and probably represents a trade that's thousands of years older than that).
The first record of spices being used comes from the Assyrian's (circa 3000 BCE). What is recorded is a myth that claims that the gods drank sesame wine on the night before they created the earth. Use of sesame as a flavouring is so ancient and widespread that it is difficult now to know the true origin of this spice. Though recent genetic evidence suggests that the plant originated near the Indian subcontinent. Thus the Assyrian myth represents our first historical evidence for an ancient spice trade.
Further evidence is provided by Egyptian records where, as far back as 2600 BCE, the labourers building Cheops' great pyramid were fed Asiatic spices to give them strength. Archaeological evidence from Sumeria (circa 2400 BCE) also suggests that cloves were popular in Syria (cloves could only be attained from the Indonesian Spice Islands, the Moluccas). Strong evidence that trade with the spice islands themselves is truly ancient.
Almost a millennium later, the remarkable Egyptian Ebers papyrus (dating to 1550 BCE) lists spices used for both medicinal and embalming procedures. Cassia and cinnamon, named in the papyrus, were essential for embalming; as were anise, marjoram and cumin all used to rinse-out the body cavities of the worthy dead. Of these spices, cassia and cinnamon are both native to south-east Asia.
Hammurabi (1792–1750 BCE) in his legal codes introduced severe penalties for sloppy or unsuccessful surgeons. This led to the use of medicinal spices in Sumaria and engendered a major spice trade there.