Khamsa of Nizami


Pegah Eidipour
published on 15 May 2023
Available in other languages: Persian
Khamsa (Quintet) of Nizami of Ganja (by Nizami, Copyright)
Khamsa (Quintet) of Nizami of Ganja
Nizami (Copyright)

Khamsa (also known as Quintet or Panj Ganj) is the best-known work of Nizami Ganjavi (c. 1141-1209 CE) and without a doubt one of the most prominent works of Persian literature. Written during the last decades of the 12th century CE, the Khamsa of Nizami contains five poems and approximately 30,000 couplets.

Nizami Ganjavi

Ilyas Yusuf Nizami Ganjavi is one of the greatest romantic poets of Persian literature. He was born in 1141 CE in Ganja (modern-day Azerbaijan) and lived during the Seljuq Dynasty (c. 1037-1194 CE), which was a vast Turkish tribal confederation then ruling over Persia. This period saw a conspicuous cultural growth, particularly in the field of literature, and, as listed by Kamran Talattof, some of Nizami's illustrious contemporaries include the poets Khaqani Shirvani (1121-1199 CE), Awhad al-Din Anvari (1126-1189 CE), and Farid al-Din Attar (1142-1220 CE), who all hold eminent positions in Persian literature in particular and the world of literature in general.

Remove Ads
Nizami drew inspiration from precedent masterpieces & Persian literary figures.

Not much is known about the poet's personal life due to the lack of primary sources and also the fact that he did not serve the royal court but found patrons among the local princes of the Seljuq Dynasty. Thus, much of the information that exists about him is extracted from his poetry, which contains autobiographical information. It appears that he has spent almost the entirety of his life in Ganja; he was born there and he also passed away in the same location. He was married and widowed three times, but only the name of one of his wives, Afaq, is known to us. There is a theory that Nizami had composed Khosrow and Shirin, a poem of the romantic genre within his Khamsa, as a tribute to Afaq.

Nizami drew inspiration from precedent masterpieces and Persian literary figures, such as Ferdowsi's Shahnameh (The Book of Kings), Ayyuqi's Varqa and Gulshah, and Gorgani's Vis and Ramin along with Arabic anecdotes and oral narratives. That being said, he kept away from mere imitation and created new and innovative material in his own unique style of writing. The same traits and approach can be seen in his Khamsa.

Remove Ads

His work is a synthesis of Persian literary achievements up to his time – the heroicness of Ferdowsi, the fatalism of Khayyam, the humanism of Sana'i, the lyricism of Unsuri and Farrukhi, and the eroticism of Gurgani. Nizami enlarged this rich and varied tradition with contemporary mysticism, with his encyclopedic knowledge, and with his sublime poetic gift. (Chelkowski, 2)

Thus, it can be said with certainty that Nizami achieved fame and reputation due to his poetry and skilled use of language rather than any affiliation with the royals.

Persian Poet Nizami
Persian Poet Nizami
Jacobolus (CC BY-SA)

Khamsa of Nizami

Khamsa (Quintet) is Nizami's most famous masterpiece, and, as suggested by the name, it contains a collection of five poems and c. 30,000 couplets. The five poems in the order in which they were composed are as follows:

Remove Ads
  • Makhzan al-Asrar (The Treasure House of Mysteries)
  • Khosrow and Shirin
  • Layla and Majnun
  • Haft Peykar (Seven Beauties)
  • Eskandarnameh (also given as Iskandarnamah, The Book of Alexander)

The intriguing storyline and the beautiful language of each poem (in particular Khosrow and Shirin, Layla and Majnun, and Haft Peykar) have provided Persian miniature painting with rich context and have turned Khamsa into one most frequently illustrated works of Persian literature along with Ferdowsi's Shahnameh.

Makhzan al-Asrar

The first and also shortest poem of Khamsa is Makhzan al-Asrar (The Treasure House of Mysteries). Unlike the continuous narrative of the other four poems, this work consists of a collection of tales with spiritual and moral lessons and instructions. That being said, it also created a basis for the introductory chapters of Nizami's and all other masnavis (poems with rhyming couplets) written after:

In this epic Nizami establishes a pattern for the introductory chapters of his later masnavis and for almost all masnavis written thereafter. They include verses in worship of God, followed by a chapter of praise and veneration of the prophet Muhammad and a description of Muhammad's ascension to the heavens. Then comes a prayer for the author, praise of the ruler, a chapter relating why the poem was created, and finally, a chapter on the excellence of the literary world. (6)

Compared to the other poems, Makhzan al-Asrar was not well received.

Muhammad's Ascent in the Khamsa of Nizami
Muhammad's Ascent in the Khamsa of Nizami
Nizami (Copyright)

Khosrow and Shirin

Khosrow and Shirin marks a turning point from mystical philosophy to romance in Khamsa. There are several theories regarding this sudden change. Some believe that it was a marketing strategy by Nizami to gain more attention, some view it as a specific commission by a specific patron, and others believe that the poem was a tribute to his wife Afaq. No matter the reason, Khosrow and Shirin reached an apogee in Persian literature:

Remove Ads

It was the first poem in Persian literature to achieve complete structural and artistic unity. (6)

The poem narrates the relationship and love affair between Khosrow II of the Sassanian Empire (r. 590-628 CE) and the Armenian princess Shirin. Although the story had been addressed before by Ferdowsi (940-1020 CE) in Shahnameh, the focus of Nizami was on the romantic relationship between the two characters rather than the historical details and events of the time that had been mentioned by Ferdowsi. The whole poem consists of 100 chapters added at different times, thus resulting in a rather complex chronology.

Khosrow Spies Shirin Bathing
Khosrow Spies Shirin Bathing
Nizami (Copyright)

Layla and Majnun

The third poem of Khamsa, Layla and Majnun, is a story of Arab origin already popular in the Islamic world. Even before Nizami, the story had been narrated by different poets and authors. Nevertheless, following the same approach as in other narratives, Nizami has looked at this love story from a new perspective as well.

Although they do not unite, Layla & Majnun have remained, even today, emblems of strong, passionate & true love.

The poem tells the love story between the two characters of Qays and Layla who fall in love with one another after meeting in school. Qays becomes afflicted by the madness of love and deserts himself from all humanity, thus becoming known throughout the story as Majnun (literally translating to madman). The poem follows the hardships of the two lovers who are separated from each other after their love for one another is revealed and who remain separated until the end of their lives. Although throughout the story the lover and the beloved do not unite, Layla and Majnun have remained, even today, emblems of strong, passionate, and true love.

Remove Ads

Haft Peykar

The fourth story of Khamsa is Haft Peykar (literally translating to Seven Bodies but figuratively translating to Seven Beauties), which narrates a romanticized biography of Sassanian ruler Bahram-e Gur (Bahram V, r. 420-438 CE). As with Khosrow and Shirin, the story had been partly narrated before by Ferdowsi in Shahnameh. Haft Peykar can be seen as containing three stages beginning with Bahram fighting for the throne that is rightfully his, continuing onto his visit to the princesses, and ending with Bahram's efforts to regain control over the kingdom and returning the order.

Bahram Gur in the Dark Palace in the Khamsa of Nizami
Bahram Gur in the Dark Palace in the Khamsa of Nizami
Nizami (Copyright)

The number seven in the title of the poem corresponds to the seven princesses from the seven climes who became Bahram's brides after he ascended to the throne. Furthermore, the number alludes to the seven domes of seven colors (according to the seven planets that rule the seven climes) under which the princesses reside. The narrative has both an erotic and a moralistic aspect, since it was Bahram's love relationship with his wives that distracted him from the business of the kingdom, and it was only by leaving those pleasures behind that he was able to regain control and get rid of chaos.


Eskandarnameh is the fifth and last poem of Khamsa:

Always fascinated by the work of Ferdowsi, it was Nizami's goal in life to write an heroic epic of the same stature. (7)

The poem is also known as Alexander Romance and is based on Greek accounts of the life of Alexander the Great (356-323 BCE). The story is divided into two sections: Sharafnameh and Iqbalnameh. The former relates the story of Alexander's conquest from Macedonia to India, while the latter focuses on his intellectual journey and growth, through which he becomes a sage.

Love History?

Sign up for our free weekly email newsletter!


With the exception of Layla and Majnun, the date of the other four poems can only be determined indirectly based on the events and names within the narratives themselves. Furthermore, from poems such as Layla and Majnun and Khosrow and Shirin one can detect the unconventional treatment of women by Nizami, who elevated the female character to a strong, virtuous, and intellectual yet passionate and tender one; mostly traits which in epic poems had been assigned to the male figures, making them the main characters of any action taking place within the narrative. Each poem of Khamsa is of great value not only in Persian literature but also worldwide. The poems are still being read, analyzed, and translated today, continuously affecting literary works.

Did you like this definition?
Editorial Review This article has been reviewed by our editorial team before publication to ensure accuracy, reliability and adherence to academic standards in accordance with our editorial policy.
Remove Ads
Subscribe to this author

About the Author

Pegah Eidipour
An inherent art and history enthusiast, Pegah received her BFA from Tehran University of Art and her MA in Art History from Academy of Art University, San Francisco. Her main focus is on Middle Eastern art, history and philosophy.



We want people all over the world to learn about history. Help us and translate this definition into another language!

Questions & Answers

Who wrote the Khamsa?

Khamsa was written by Persian poet Nizami Ganjavi (c. 1141-1209 CE).

What are the five poems in the Khamsa of Nizami?

The five poems are: Makhzan al-Asrar (The Treasure House of Mysteries), Khosrow and Shirin, Layla and Majnun, Haft Peykar (Seven Beauties), and Eskandarnameh (also given as Iskandarnamah, The Book of Alexander).

Free for the World, Supported by You

World History Encyclopedia is a non-profit organization. For only $5 per month you can become a member and support our mission to engage people with cultural heritage and to improve history education worldwide.

Become a Member  

Recommended Books

World History Encyclopedia is an Amazon Associate and earns a commission on qualifying book purchases.

Cite This Work

APA Style

Eidipour, P. (2023, May 15). Khamsa of Nizami. World History Encyclopedia. Retrieved from

Chicago Style

Eidipour, Pegah. "Khamsa of Nizami." World History Encyclopedia. Last modified May 15, 2023.

MLA Style

Eidipour, Pegah. "Khamsa of Nizami." World History Encyclopedia. World History Encyclopedia, 15 May 2023. Web. 18 Jun 2024.