Hedayat was born in Tehran on 8 June 1800 to a renowned family which was descended from the prominent 14th-century lyric-poet Kamal Khujandi.
He was given the title of Khan and of Amir-ol Sho'ara in 1830, when Fath Ali Shah visited Shiraz.
Mohammed Shah instructed him to remain at the court and in 1841 selected him as tutor to his son Prince Abbas Mirza Molk Ara.
Relations between Iran and Khwarazm were at this time strained by mutual distrust, the Khan of Khiva having been accused of supporting the Salar Revolt and conducting raids on Northern Khorasan some years prior.
[2] He was minister of education in 1852 and principal of the newly founded Dar-ol-fonoon College at Tehran.