The term derives from Ancient Greek φαρμακοποιΐα (pharmakopoiia) (literally "drugmaking"), from φάρμακον (pharmakon) "drug", followed by the verb-stem ποι- (poi-) 'make' and finally the abstract noun ending -ια (-ia). From Ancient Egyptian "Peh-Ir-Maki", meaning "He who brings security"—one of the characterizations of Thoth, the Egyptian god of Scribes, who is also associated with healing.
In early modern editions of Latin texts, the Greek spellings φ (f), κ (k) and οι (oi) are respectively written as ph, c, and œ, giving the spelling pharmacopœia. In UK English, the letter œ is rendered as oe, giving us the spelling pharmacopoeia, while in American English oe becomes e, giving us the spelling pharmacopeia.
Although older writings exist which deal with herbal medicine, the major initial works in the field are considered to be the Edwin Smith Papyrus in Egypt, Pliny’s pharmacopoeia and De Materia Medica (Περί ύλης ιατρικής), a five-volume book originally written in Greek by Pedanius Dioscorides. The latter is considered to be precursor to all modern pharmacopoeias, and is one of the most influential herbal books in history. In fact it remained in use until about CE 1600.
A number of early pharmacopoeia books were written by Persian physicians. These included The Canon of Medicine of Avicenna in 1025, and works by Ibn Zuhr (Avenzoar) in the 12th century (and printed in 1491), and Ibn Baytar in the 14th century. The Shen-nung pen ts'ao ching (Divine Husbandman's Materia Medica) is the earliest known Chinese pharmacopia. The text describes 365 medicines derived from plants animals and minerals; according to legend it was written by the Chinese god Shennong.