Herodotus warns us that he’s done his best to reconstruct Cyrus’s origin story from contemporary accounts, but that most of those accounts were pretty clearly written with the goal of flattering the Persians, so, who knows? Also for some reason he feels he needs to start a few centuries before Cyrus’s birth. Flashback to the collapse of the Assyrian Empire, which apparently spanned much of the Middle East out towards India and Ukraine for centuries! Eventually the Medes revolted, triggering the empire’s fall. When the Medes successfully kicked out the Assyrians, all their other subjugated peoples were like, hey, we can do that, and next thing you know the Assyrian Empire was over and the region was a sprawl of squabbling successor countries, failed states, and anarchic war zones. But then Deïokes son of Phraortes, a Mede, had the idea of getting himself named king! Which he accomplished through the novel method of being really good at ruling his farm, until his admiring neighbors starting coming to him with problems and recruiting him to rule their farms too, and then his village was so well-ruled that nearby villages wanted to be ruled by him also, and next thing you knew he was king of the Medes! Herodotus tsk-tsks this dastardly plot to seize power.
Deïokes had the Medes build him a palace and a small army, and then around the palace he had them construct a walled city, his capital Agbatana. Agbatana’s walls were really cool, Herodotus has to admit: there were seven concentric walls, with each wall slightly higher than the next wall out, making a sort of cone. Inside the central wall was Agbatana’s rich district, the palace and the treasuries and such, and the real estate value went down as you went further out. Each wall was painted a different color: from outermost in, they were white, black, crimson, blue, red (not the same as crimson apparently), silver, and gold.
Deïokes was also the first king to pronounce that it was illegal to laugh at him or bug him; he wanted all his business done through a small cadre of stone faced messengers. His thinking, Herodotus speculates, was that if the Medes never saw him, they would forget that he was just a regular guy and ascribe holy and/or magical powers to him, such that they wouldn’t dare rebel against him. After fifty-three years of this (plus there was a whole secret police thing that Herodotus doesn’t have time to get into detail about) Deïokes passed away, and the throne went to his son Phraortes, named after his grandfather. Phraortes set about conquering the old Assyrian Empire, but after twenty-two years of inconclusive campaigning fell in battle. His son Kyaxares, another war-king, invented the idea of organizing troops into battalions and platoons and you guys train with horses and you other guys with bows; before him armies were more sort of unruly mobs than anything else. Kyaxares conquered the bulk of the old Assyrian Empire, but when his forces were scattered and exhausted after the long campaign, the Scythians came in from the north and conquered them, and the Scythians obtained rule over all Asia.
The Scythians almost invaded Egypt, but then Pharaoh bribed them to not invade instead, so they didn’t. Instead they looted the city of Ascalon, in Syria, and plundered the temple to Aphrodite there. Herodotus is given to understand that this particular temple to Aphrodite was the oldest in the world, and so it’s only natural that the Scythians who looted it were struck by a divine curse, transforming them and all their descendants into women. This was just typical Scythian behavior: they pretty much ran the Middle East into the ground, in the relatively short time they ruled it. After almost thirty years of increasingly erratic behavior from their Scythian overlords, the Medes decided they’d had enough, and poisoned them all at a feast. Kyaxares took over as king again, and everything was hunky-dory.