Shāh Ashraf Hotak, (Pashto, Dari: شاہ أشرف ہوتک), also known as Shāh Ashraf Ghiljī (Pashto: شاه اشرف غلجي) (died 1730), son of Abdul Aziz Hotak, was the fourth ruler of the Hotak dynasty. An Afghan from the Ghilji Pashtuns, he served as a commander in the army of Mahmud Hotak during his revolt against the heavily declining Safavid Persians. Ashraf also participated in the Battle of Gulnabad. In 1725, he briefly succeeded to the throne (Shah of Persia) after the death of his cousin Mahmud.
The nephew of Mirwais Hotak, his reign was noted for the sudden decline in the Hotak Empire under increasing pressure from Turkish, Russian, and Persian forces.
Ashraf Khan halted both the Russian and Turkish onslaughts. He defeated the Ottoman Empire, who wanted to reestablish their former arch rivals, the Safavids, back on the throne, in a battle near Kermanshah after the enemy had come close to Isfahan. This led to peace negotiations with the Sublime Porte, which were briefly disrupted after Ashraf's ambassador insisted his master should be Caliph of the East and the Ottoman Sultan Caliph of the West. This caused great umbrage to the Ottomans, but a peace agreement was finally signed at Hamadan due to superior Ottoman diplomacy in the autumn of 1727.
Ultimately, the royal Persian army of Shah Tahmasp II (One of the Shah Sultan Husayn's sons) under the leadership of Nader defeated Ashraf's Ghilji forces in a decisive battle known as the Battle of Damghan in October 1729, banishing and driving out the Afghans back to what is now Afghanistan.
During the retreat, Ashraf was captured and murdered by Khan of Kalat Mir Mohabbat Khan Baloch in 1730.
Ashraf, having taken Yazd and Kirmán, marched into Khurásán with an army of thirty thousand men to give battle to Ṭahmásp, but he was completely defeated by Nádir on October 2 at Dámghán. Another decisive battle was fought in the same year at Múrchakhúr near Iṣfahán. The Afgháns were again defeated and evacuated Iṣfahán to the number of twelve thousand men, but, before quitting the city he had ruined, Ashraf murdered the unfortunate ex-Shah Husayn, and carried off most of the ladies of the royal family and the King's treasure. When Ṭahmásp II entered Iṣfahán on December 9 he found only his old mother, who had escaped deportation by disguising herself as a servant, and was moved to tears at the desolation and desecration which met his eyes at every turn. Nádir, having finally induced Ṭahmásp to empower him to levy taxes on his own authority, marched southwards in pursuit of the retiring Afgháns, whom he overtook and again defeated near Persepolis. Ashraf fled from Shíráz towards his own country, but cold, hunger and the unrelenting hostility of the inhabitants of the regions which he had to traverse dissipated his forces and compelled him to abandon his captives and his treasure, and he was finally killed by a party of Balúch tribesmen.
Ashraf Khan's death marked the end of Hotak rule in Persia, but the country of Afghanistan was still under Shah Hussain Hotak's control until Nader Shah's 1738 conquest of Kandahar where the young Ahmad Shah Durrani was held prisoner. It was only a short pause before the establishment of the last Afghan Empire (modern state of Afghanistan) by Ahmad Shah Durrani in 1747.