Poetry as an art form predates written text. The earliest poetry is believed to have been recited or sung, employed as a way of remembering oral history, genealogy, and law. Poetry is often closely related to musical traditions, and the earliest poetry exists in the form of hymns (such as the work of Sumerian priestess Enheduanna), and other types of song such as chants. As such poetry is a verbal art. Many of the poems surviving from the ancient world are recorded prayers, or stories about religious subject matter, but they also include historical accounts, instructions for everyday activities, love songs, and fiction. Many scholars, particularly those researching the Homeric tradition and the oral epics of the Balkans, suggest that early writing shows clear traces of older oral traditions, including the use of repeated phrases as building blocks in larger poetic units. A rhythmic and repetitious form would make a long story easier to remember and retell, before writing was available as an aide-memoire. Thus many ancient works, from the Vedas (1700 - 1200 BC) to the Odyssey (800 - 675 BC), appear to have been composed in poetic form to aid memorization and oral transmission, in prehistoric and ancient societies. Poetry appears among the earliest records of most literate cultures, with poetic fragments found on early monoliths, runestones and stelae.
In Africa, poetry has a history dating back to prehistorical times with the creation of hunting poetry, and panegyric and elegiac court poetry were developed extensively throughout the history of the empires of the Nile, Niger and Volta river valleys . Some of the earliest written poetry in Africa can be found among the Pyramid Texts written during the 25th century BC, while the Epic of Sundiata is one of the most well-known examples of griot court poetry. In African cultures, performance poetry is traditionally a part of theatrics, which was present in all aspects of pre-colonial African life  and whose theatrical ceremonies had many different functions, including political, educative, spiritual and entertainment. Poetics were an element of theatrical performances of local oral artists, linguists and historians, accompanied by local instruments of the people such as the kora, the xalam, the mbira and the djembe drum. Drumming for accompaniment is not to be confused with performances of the talking drum, which is a literature of its own, since it is a distinct method of communication that depends on conveying meaning through non-musical grammatical, tonal and rhythmic rules imitating speech.  Although, these performances could be included in those of griots.
The oldest surviving speculative fiction poem is the Tale of the Shipwrecked Sailor, written in Hieratic and ascribed a date around 2500 B.C.E. Other sources ascribe the earliest written poetry to the Epic of Gilgamesh written in cuneiform; however, it is most likely that The Tale of the Shipwrecked Sailor predates Gilgamesh by half a millennium. The oldest epic poetry besides the Epic of Gilgamesh are the Greek epics Iliad and Odyssey and the Indian Sanskrit epics Ramayana and Mahabharata. Some scholars believe that either the Mahabharata or the Tibetan Epic of King Gesar is the longest example of epic poetry in history.
Ancient thinkers sought to determine what makes poetry distinctive as a form and what distinguishes good poetry from bad, resulting in the development of "poetics", or the study of the aesthetics of poetry. Some ancient societies, such as the Chinese through the Classic of History, one of the Five Classics, developed canons of poetic works that had ritual as well as aesthetic importance. More recently, thinkers struggled to find a definition that could encompass formal differences as great as those between Chaucer's The Canterbury Tales and Matsuo Bash?'s Oku no Hosomichi, as well as differences in context that span from the religious poetry of the Tanakh to love poetry to rap.
Context can be critical to poetics and to the development of poetic genres and forms. For example, poetry employed to record historical events in epics, such as Gilgamesh or Ferdowsi's Shahnameh, will necessarily be lengthy and narrative, while poetry used for liturgical purposes in hymns, psalms, suras and hadiths is likely to have an inspirational tone, whereas elegies and tragedy are intended to invoke deep internal emotional responses. Other contexts include music such as Gregorian chants, formal or diplomatic speech, political rhetoric and invective, light-hearted nursery and nonsense rhymes, threnodies to the deceased and even medical texts.
The Polish historian of aesthetics, W?adys?aw Tatarkiewicz, in a paper on "The Concept of Poetry," traces the evolution of what is two concepts of poetry. Tatarkiewicz points out that the term is applied to two distinct things that, as the poet Paul Valéry observes, "at a certain point find union. Poetry [...] is an art based on language. But poetry also has a more general meaning [...] that is difficult to define because it is less determinate: poetry expresses a certain state of mind."
Classical thinkers employed classification as a way to define and assess the quality of poetry. Notably, Aristotle's Poetics describes the three genres of poetry: the epic, comic, and tragic, and develops rules to distinguish the highest-quality poetry of each genre, based on the underlying purposes of that genre. Later aestheticians identified three major genres: epic poetry, lyric poetry and dramatic poetry, treating comedy and tragedy as subgenres of dramatic poetry. Aristotle's work was influential throughout the Middle East during the Islamic Golden Age, as well as in Europe during the Renaissance. Later poets and aestheticians often distinguished poetry from, and defined it in opposition to, prose, which was generally understood as writing with a proclivity to logical explication and global trade. In addition to a boom in translation, during the Romantic period numerous ancient works were rediscovered.
The Classic of Poetry, often known by its original name of the Odes or Poetry is the earliest existing collection of Chinese poems and songs. This poetry collection comprises 305 poems and songs dating from the 10th to the 7th century BC.The stylistic development of Classical Chinese poetry consists of both literary and oral cultural processes, which are conventionally assigned to certain standard periods or eras, corresponding with Chinese Dynastic Eras, the traditional chronological process for Chinese historical events. The poems preserved in written form constitute the poetic literature. Furthermore, there is or were parallel traditions of oral and traditional poetry also known as popular or folk poems or ballads. Some of these poems seem to have been preserved in written form. Generally, the folk type of poems they are anonymous, and may show signs of having been edited or polished in the process of fixing them in written characters. Besides the Classic of Poetry, or Shijing, another early text is the Songs of the South (or, Chuci), although some individual pieces or fragments survive in other forms, for example embedded in classical histories or other literature.
The development of modern poetry is generally seen as having started at the beginning of the 20th century and extends into the 21st century. Among its major practitioners are Robert Frost, Wallace Stevens, and Anne Carson.
The use of verse to transmit cultural information continues today. Many Americans know that "in 1492, Columbus sailed the ocean blue". An alphabet song teaches the names and order of the letters of the alphabet; another jingle states the lengths and names of the months in the Gregorian calendar. Some writers believe poetry has its origins in song. Most of the characteristics that distinguish it from other forms of utterance—rhythm, rhyme, compression, intensity of feeling, the use of refrains—appear to have come about from efforts to fit words to musical forms. In the European tradition the earliest surviving poems, the Homeric and Hesiodic epics, identify themselves as poems to be recited or chanted to a musical accompaniment rather than as pure song. Another interpretation is that rhythm, refrains, and kennings are essentially paratactic devices that enable the reciter to reconstruct the poem from memory.
In preliterate societies, these forms of poetry were composed for, and sometimes during, performance. There was a certain degree of fluidity to the exact wording of poems. The introduction of writing fixed the content of a poem to the version that happened to be written down and survive. Written composition meant poets began to compose for an absent reader. The invention of printing accelerated these trends. Poets were now writing more for the eye than for the ear.
The development of literacy gave rise to more personal, shorter poems intended to be sung. These are called lyrics, which derives from the Greek lura or lyre, the instrument that was used to accompany the performance of Greek lyrics from about the seventh century BC onward. The Greek's practice of singing hymns in large choruses gave rise in the sixth century BC to dramatic verse, and to the practice of writing poetic plays for performance in their theatres. In more recent times, the introduction of electronic media and the rise of the poetry reading have led to a resurgence of performance poetry in the lyric genre.