Astyages succeeded his father in 585 BCE, following the Battle of Halys, which ended a five-year war between the Lydians and the Medes. He inherited a large empire, ruled in alliance with his two brothers-in-law, Croesus of Lydia and Nebuchadnezzar of Babylon, whose wife, Amytis, Astyages' sister, was the queen for whom Nebuchadnezzar was said to have built the Hanging Gardens of Babylon. However, due to recent evidence, the garden was likely built by the Assyrian King Sennacherib. Married to Aryenis, the sister of King Croesus of Lydia, to seal the treaty between the two empires, Astyages ascended to the Median throne upon his father's death later that year. The ancient sources report almost nothing about Astyages’ reign, and a final judgment on his character is not possible, since Herodotus’ negative account and Ctesias’ favorable one, are both biased. According to Cyropaedia of Xenophon, after thirty-two years of relative stability, Astyages lost the support of his nobles during the war against Cyrus, whom Xenophon understands as being Astyages' grandson. This resulted in the founding of the Persian empire by Cyrus.
The account given by the ancient Greek historian Herodotus relates that Astyages had a dream in which his daughter, Mandane, gave birth to a son who would destroy his empire. Fearful of the dream's prophecy, Astyages married her off to Cambyses I of Anšan, who had a reputation for being a "quiet and thoughtful prince" and whom Astyages believed to be no threat. When a second dream warned Astyages of the dangers of Mandane's offspring, Astyages sent his general Harpagus to kill the child Cyrus. Herodotus correctly names Cyrus' parents, though he fails to mention that Cambyses was a king. Modern scholarship generally rejects his claim that Cyrus was the grandson of Astyages. Harpagus, unwilling to spill royal blood, gave the infant to a shepherd, Mitridates, whose wife had just given birth to a stillborn child. Cyrus was raised as Mitridates' own son, and Harpagus presented the stillborn child to Astyages as the dead Cyrus. When Cyrus was found alive at age ten, Astyages spared the boy on the advice of his Magi, returning him to his parents in Anshan. Harpagus, however, did not escape punishment, as Astyages is said to have fed him his own son at a banquet. Cyrus succeeded his father in 559, and in 553, on the advice of Harpagus, who was eager for revenge for being given the "abominable supper," Cyrus rebelled against Astyages. After three years of fighting, Astyages' troops mutinied during the battle of Pasargadae, and Cyrus conquered the Median's empire. Astyages was spared by Cyrus, and despite being taunted by Harpagus, Herodotus says he was treated well and remained in Cyrus' court until his death. Rather than giving the popular mythology that Cyrus was suckled by a dog, the dog was sacred to Persians. cf. also the legend of Sargon, or the similar legend of Romulus and Remus, suckled by a she-wolf. Herodotus explains that the herdsman Mitridates lived with another of Astyages' slaves, a woman named 'Spaco,' which he explains is Median for "dog." gives both the legend and Herodotus' rationalized version.
Defeat
The contemporary Chronicle of Nabonidus refers to the mutiny on the battlefield as the cause for Astyages' overthrow, but does not mention Harpagus by name. However, since Harpagus was Astyages' general at the battle of Pasargadae and his family were granted high positions in Cyrus' empire after the war, and since Harpagus went on to become Cyrus' most successful general, it is possible he had something to do with the mutiny against Astyages. Cyrus then went on to capture Astyages' capital of Ecbatana. Ancient sources agree that after Astyages was taken by Cyrus he was treated with clemency, though the accounts differ. Herodotus says that Cyrus kept Astyages at his court during the remainder of his life, while according to Ctesias, he was made a governor of a region of Parthia and was later murdered by a political opponent, Oebares. The circumstances of Astyages' death are not known. After Astyages' overthrow, Croesus marched on Cyrus to avenge Astyages. Cyrus, with Harpagus at his side, defeated Croesus and conquered Lydia in or after 547 BCE.