The short answer
It depends on which Persian empire you mean. The last king of the Achaemenid Empire was Darius III, who died in 330 BCE. The last king of the Sasanian Empire was Yazdegerd III, who died around 651 CE. If you mean the last monarch to rule Iran at all, that was Mohammad Reza Pahlavi, who left the country in 1979.
Darius III, last Achaemenid king
Darius III came to the throne around 336 BCE, after a period of court turmoil. He fought Alexander the Great at the battles of Issus (333 BCE) and Gaugamela (331 BCE) and lost both. After Gaugamela he withdrew toward the eastern provinces. In 330 BCE he was seized by Bessus, the satrap of Bactria, and was killed. Alexander found him dead or dying, according to ancient accounts, and is said to have given him a royal burial, though the details come from Greek and Roman writers and should be treated with care.
Bessus then claimed the kingship for a time under the name Artaxerxes V, but he was captured and executed by Alexander. Because of this, some lists mention him as a short-lived claimant rather than as a true successor. You can see the full sequence of kings in the Persian Empire kings timeline.
Yazdegerd III, last Sasanian king
Yazdegerd III became king in the 630s CE, while the Sasanian state was already weakened by long wars with the Byzantines and by internal conflict. Arab Muslim armies defeated the Sasanians at al-Qadisiyyah and later at Nahavand (traditionally dated to around 642 CE). Yazdegerd moved from place to place in the east, and he was killed near Merv around 651 CE. His death is usually taken as the end of the Sasanian dynasty and of the pre-Islamic Persian monarchy.
Later rulers of Iran
Iran continued to have kings, who were called shahs, for centuries after that, under dynasties such as the Safavids, Qajars and Pahlavis. The Pahlavi dynasty ended with the Iranian Revolution of 1979. For that part of the story, see what happened to the Shah of Persia.