After Khusrau's grandfather's death, Khusrau joined the army of Malik Chajju, a nephew of the reigning Sultan, Ghiyas ud-Din Balban. This brought his poetry to the attention of the Assembly of the Royal Court where he was honoured.
Nasir ud-Din Bughra Khan, the second son of Balban, was invited to listen to Khusrau. He was impressed and became Khusrau's patron in 1276. In 1277 Bughra Khan was then appointed ruler of
Bengal, and Khusrau visited him in 1279 while writing his second divan,
Wast ul-Hayat (The Middle of Life). Khusrau then returned to Delhi. Balban's eldest son, Khan Muhammad (who was in
Multan), arrived in Delhi, and when he heard about Khusrau, he invited him to his court. Khusrau then accompanied him to Multan in 1281. Multan at the time was the gateway to India and was a center of knowledge and learning. Caravans of scholars, tradesmen and emissaries transited through Multan from
Baghdad,
Arabia and
Persia on their way to Delhi. Khusrau wrote that: On 9 March 1285, Khan Muhammad was killed in battle while fighting
Mongols who were invading the Sultanate. Khusrau wrote two elegies in grief of his death. In 1287, Khusrau travelled to
Awadh with another of his patrons, Amir Ali Hatim. At the age of eighty, Balban called his second son Bughra Khan back from Bengal, but Bughra Khan refused. After Balban's death in 1287, his grandson
Muiz ud-Din Qaiqabad, Bughra Khan's son, was made the Sultan of Delhi at the age of 17. Khusrau remained in Qaiqabad's service for two years, from 1287 to 1288. In 1288, Khusrau finished his first
masnavi, ''Qiran us-Sa'dain'' (Meeting of the Two Auspicious Stars), which was about Bughra Khan meeting his son Muiz ud-Din Qaiqabad after a long enmity. After Qaiqabad suffered a stroke in 1290, nobles appointed his three-year-old son
Shams ud-Din Kayumars as Sultan. A Turko-Afghan named
Jalal ud-Din Firuz Khalji then marched on Delhi, killed Qaiqabad and became Sultan, thus ending the Mamluk dynasty of the Delhi Sultanate and starting the
Khalji dynasty. Jalal ud-Din Firuz Khalji appreciated poetry and invited many poets to his court. Khusrau was honoured and respected in his court and was given the title "Amir". He was given the job of "Mushaf-dar". Court life made Khusrau focus more on his literary works. Khusrau's ghazals which he composed in quick succession were set to music and were sung by singing girls every night before the Sultan. Khusrau writes about Jalal ud-Din Firuz: In 1290, Khusrau completed his second masnavi,
Miftah ul-Futuh (Key to the Victories), in praise of Jalal ud-Din Firuz's victories. In 1294, Khusrau completed his third divan,
Ghurrat ul-Kamaal (The Prime of Perfection), which consisted of poems composed between the ages of 34 and 41. After Jalal ud-Din Firuz,
Ala ud-Din Khalji ascended to the throne of Delhi in 1296. Khusrau wrote the ''Khaza'in ul-Futuh'' (The Treasures of Victory) recording Ala ud-Din's construction works, wars and administrative services. He then composed a khamsa (quintet) with five masnavis, known as
Khamsa-e-Khusrau (Khamsa of Khusrau), completing it in 1298. The khamsa emulated that of the earlier poet of Persian epics,
Nizami Ganjavi. The first masnavi in the khamsa was
Matla ul-Anwar (Rising Place of Lights) consisting of 3310 verses (completed in 15 days) with ethical and Sufi themes. The second masnavi,
Khusrau-Shirin, consisted of 4000 verses. The third masnavi,
Laila-Majnun, was a romance. The fourth voluminous masnavi was
Ayina-i Iskandari, which narrated the heroic deeds of
Alexander the Great in 4500 verses. The fifth masnavi was
Hasht-Bihisht, which was based on legends about
Bahram V, the fifteenth king of the
Sasanian Empire. All these works made Khusrau a leading luminary in the world of poetry. Ala ud-Din Khalji was highly pleased with his work and rewarded him handsomely. When Ala ud-Din's son and future successor
Qutb ud-Din Mubarak Shah Khalji was born, Khusrau prepared the horoscope of Mubarak Shah Khalji in which certain predictions were made. This horoscope is included in the masnavi
Saqiana. In 1300, when Khusrau was 47 years old, his mother and brother died. He wrote these lines in their honour: A double radiance left my star this year Gone are my brother and my mother, My two full moons have set and ceased to shine In one short week through this ill-luck of mine. Khusrau's homage to his mother on her death was: Khusrau was accepted in Alauddin's court but the negligence was notable.
Ziauddin Barani accuses Alauddin of not recognizing Khusrau's worth: enthroned.
Duval Rani Khizr Khan of Amir Khusrau Dihvali. Scribe, Sultan Bayazid ibn Nizam.
Mughal, dated A.H. 976 (1568) National Museum, New Delhi (L53.217). In 1310, Khusrau became a disciple of Sufi saint of the
Chishti Order,
Nizamuddin Auliya. In 1315, Khusrau completed the romantic masnavi
Duval Rani - Khizr Khan (
Duval Rani and Khizr Khan), about the marriage of the
Vaghela princess Duval Rani to Khizr Khan, one of Ala ud-Din Khalji's sons. This verse is believed to have been inscribed on several
Mughal structures, supposedly in reference to
Kashmir, specifically a particular building at the
Shalimar Garden in Srinagar, Kashmir (built during the reign of Mughal Emperor
Jahangir). However, recent scholarship has traced the verse to a time much later than that of Khusrau and to a place quite distant from Kashmir. Historian Rana Safvi inspected all probable buildings in the Kashmir garden and found no such inscription attributed to Khusrau. According to her the verse was composed by
Sa'adullah Khan, a leading noble and scholar in the court of Jahangir's successor and son
Shah Jahan. Even in popular memory, it was Jahangir who first repeated the phrase in praise of Kashmir. ==Contributions to Hindustani music==