Agis was a son of king Archidamus III of Sparta and succeeded his father in 338 BCE. At more or less the same time, the armies of the Greek towns were defeated at Chaeronea by king Philip II of Macedonia, who now reorganized all of Greece in the Corinthian League. Its aim was to attack the Achaemenid Empire, where king Artaxerxes III Ochus had died and had been succeeded by the inexperienced Artaxerxes IV Arses. Eventually, Philip was assassinated before this war started (text); his son Alexander succeeded him and attacked the Persians, leaving his father's courtier Antipater in charge of the European part of his empire.
Agis embarked upon an anti-Macedonian course, hoping to benefit from Alexander's absence. In the late spring of 333, he accepted money from Pharnabazus, a Persian admiral who was active in the Aegean Sea. At first, the Spartan king was unable to achieve much, but in the winter of 333/332, he received many Greek mercenaries who had fought for the Persian king Darius III Codomannus, had survived the battle of Issus, and were now looking for a new employer. Agis immediately invaded Crete, where he reorganized affairs and recruited additional soldiers. This forced Alexander to send ships with reinforcements to the Aegaean Sea, commanded by a man named Amphoterus.
Agis now organized an anti-Macedonian coalition that included Elis and almost all Achaean and Arcadian towns, except for Achaean Pellene and Arcadian Megalopolis, which was famous for its anti-Spartan policy. Agis defeated a Macedonian commander named Corragus, and laid siege to Megalopolis. As Antipater was involved in a war against the tribes of Thrace, the Spartans had a fair chance to capture the city before the Macedonians would arrive on the scene.
However, Antipater broke off the Thracian war and marched to the south with a large army. Diodorus of Sicily tells what happened:
Antipater added soldiers from those of the Greeks who were still loyal and built up his force until it numbered not less than 40,000. When it came to a general engagement, Agis was struck down fighting, but the Spartans fought furiously and maintained their position for a long time. When their Greek allies were forced out of position they themselves fell back on Sparta. More than 5,300 of the Spartans and their allies were killed in battle, and 3,500 of Antipater's troops.
These statistics, which look plausible, mean that the fight at Megalopolis was one of the biggest battles in Greek history. Diodorus continues:
An interesting event occurred in connection with Agis' death. He had fought gloriously and fell with many frontal wounds. As he was being carried by his soldiers back to Sparta, he found himself surrounded by the enemy. Despairing of his own life, he ordered the rest to make their escape with all speed and to save themselves for the service of their country, but he himself armed and rising to his knees defended himself, killed some of the enemy and was himself slain by a javelin cast. He had reigned nine years.note[Diodorus, World History, 17.62.1-63.4; tr. C.B. Welles.]
For the next seven years, the Macedonians had nothing to fear from the Greeks.
The chronology of Agis' insurrection is a notorious problem. It is certain that it was still going on in the summer of 331, when Alexander released some Athenian prisoners to make sure that their city kept out of the conflict; and it is certain that the news of the death of Agis had not reached Alexander in December 331, when he sent money from Susa to Antipater. The battle of Megalopolis can have taken place as early as the autumn of 331 and as late as the summer of 330.