Ferdowsi is best known for his literary epic Shahnameh, to which he devoted most of his life. Shahnameh was originally drafted by Ferdowsi for the Princes of Samanids, who were responsible for revival of the Persian cultural traditions after the Arab invasion.
Ferdowsi would live to see the Samanids conquered by the Ghaznavid Turks. The new ruler Mahmud of Ghaznavi would lack the same interest in Ferdowsi's work as that shown by the Samanids,resulting in him losing favor with the royal court.