Throughout history, the concept of an “ideal society” and the idea of an ideal state structure have been the focus of attention of philosophers and poets. One of the first who gave a description of a utopian society in the Muslim east was Abu Nasr al-Farabi. After him, the idea of an “ideal society” was presented in his five poems by the Azerbaijani poet-philosopher of the XII century, Nizami Ganjavi. Almost all the works of the great Azerbaijani thinker Nizami Ganjavi are imbued with the idea of an ideal society, an ideal state and an ideal ruler. But a special place it is occupied by his last poem from “Hamse” – “Iskendername”. This article gives a brief summary of Nizami's philosophical thoughts about an ideal society, about an ideal ruler, mainly based on the poem “Iskendername”.