Harpagus was a courtier of the Median leader Astyages, whose reign can tentatively be dated between 585 and 550 BCE . According to the Histories of the Greek researcher Herodotus, who is the only source for Harpagus' life but lived a century after the events, Astyages had a dream about the son of his daughter Mandane and her husband Cambyses, Cyrus, which he took as an evil omen. Therefore, Astyages ordered his courtier Harpagus to kill the young boy, but Harpagus secretly gave it to a herdsman, who was to do the dreadful deed. Fortunately, the herdsman and his wife decided not to kill the baby, but to accept him as their own son.
When the boy was ten years old, it became obvious that he was not a herdsman's son. His behavior was too noble, according to Herodotus. King Astyages started to suspect what had happened when he interviewed the boy and noticed that his face resembled his own. He ordered Harpagus to explain what he had done with the baby, and after the courtier had confessed that he had not killed Astyages' grandchild, the king forced him to eat his own son. Cyrus received a favorable treatment and was allowed to go to his own parents, Cambyses and Mandane.
According to Herodotus, Harpagus was looking for an opportunity to avenge himself. When Cyrus had come of age, Harpagus managed to convince the young man that the Medes were ready to revolt against their king, who had become a despot. Cyrus organized a federation of ten Persian tribes and revolted, and Astyages 'armed all the Medes, and blinded by divine providence he appointed Harpagus to be the leader of the army'. Of course, Harpagus did not hesitate to switch allegiance. During a battle that was (according to a later source, the geographer Strabo of Amasia) fought at Pasargadae, the Medes sided with the Persians. The united army marched to the Median capital and seized Astyages, who was kept captive by Cyrus.
Of course, the first part of this story is an oriental fairy-tale, invented to explain the historical fact in the second part: Astyages was betrayed. We can read it in the near contemporary Chronicle known as ABC7 (also known as the Chronicle of Nabonidus) too:
king Astyages called up his troops and marched against Cyrus, king of Anšan [i.e., Persia], in order to meet him in battle. The army of Astyages revolted against him and in fetters they delivered him to Cyrus. Cyrus marched against the country Ecbatana; the royal residence he seized; silver, gold, other valuables of the country Ecbatana he took as booty and brought to Anšan.
It is possible that the deepest cause of the rebellion of Cyrus and Harpagus was dissatisfaction with Astyages' policy. In the sixth century, the Iranian tribes became more and more settled, and their kings were no longer the first among equal tribal chiefs, but started to behave as real kings. When Astyages started to punish one of the other tribal chiefs, revolt was inevitable.
The fall of Astyages was not the end of the war, however, because Astyages' allies, the Lydians, attacked the new Achaemenid empire in c.547 BCE. The Lydian king Croesus was outsmarted by Cyrus, and in the winter, he was besieged in his capital, Sardes. Before the last battle was to begin, Harpagus advised Cyrus to place his dromedaries in front of his warriors; the Lydian horses, not used to the dromedaries' smell, would be very afraid. And indeed, the Lydian cavalry became useless and the Persians won the battle. According to Chronicle #7, Croesus was killed.
The pacification of Lydia was left to a Persian satrap named Tabalus, who was to subdue the Greek towns on the boards of the Aegean Sea that had once belonged to the Lydian empire. The task of sending Croesus' treasury to Persia was entrusted to a Lydian named Pactyes. As soon as Cyrus had gone home, Pactyes induced the Lydians to revolt and, using the money, hired mercenaries in the Greek towns and started to besiege Sardes.
Cyrus sent a Mede named Mazares to reconquer Lydia, but this general died soon after he had liberated Sardes and taken the Greek towns Priene and Magnesia. Harpagus took over the command. He marched to the other Greek towns, which he attacked by means of earthworks, something that the Greeks had never seen before. He took Phocaea and Teos, and then moved to the south, where he subdued the Carians, the Kaunians, the Lycians and the city Xanthus. Later, Harpagus went north, where he captured several other Greek towns. It seems that he concluded his campaigns in 542 BCE.
Nothing is known about Harpagus' old age, but it seems that the local dynasty of Lycia descended from the man who had been Cyrus' kingmaker.