The Nephites had taken back multiple cities, but Helaman needed reinforcements from Zarahemla to hold the cities, and none were forthcoming. Meanwhile the Lamanite armies were growing stronger every day. When Ammoron led a Lamanite attack on the city of Nephihah, Moroni assumed that the government in Zarahemla would send men to defend it, but none were sent and the people there were slaughtered.
When Moroni saw that the city of Nephihah had been lost, he was very sad. And then he became angry with the government in Zarahemla for their indifference toward the freedom of their country. And Jesus said to Moroni, "If those who have been appointed your governors do not repent of their sins and wickedness, you shall go up in battle against them."
So Moroni sent a letter to the chief judge Pahoran in Zarahemla, saying, "The Lamanites are attacking our cities and slaughtering our women and children. How can you just sit on your thrones in a thoughtless stupor while your enemies spread the work of death around you? Unless you start helping to defend your people, I will march on Zarahemla and bring God's judgement upon you."
What Moroni didn't know is that the wicked Nephites known as the king-men had taken control of the government in Zarahemla and appointed a man named Pachus to be king. They drove away Pahoran and his supporters, and Pachus made an alliance with Ammoran, the Lamanite king. Pahoran wrote back to Moroni explaining this and asking for his help in retaking the capital.
Moroni was very happy to learn that Pahoran was not a traitor, and he took some of his men to combine with Pahoran's supporters and together they retook Zarahemla from the king-men. Pachus was killed and Pahoran restored as chief judge. Any of the king-men who would not take up arms to defend their country or who was found denying their freedom were quickly tried and put to death.
Reinforcements were now sent out to bolster the Nephite armies. Moroni led an army to retake Nephihah. Under cover of night Moroni and some of his forces scaled the city walls. When the Lamanites awoke to find the Nephite army inside the city, they panicked and began to flee out the city gate where the other part of Moroni's army killed many of them and took others prisoner.
Moroni's army and two other Nephite armies pursued Ammoron's Lamanite army from city to city until they managed to surround them at the seashore. Exhausted, the armies from both sides encamped. Then Teancum, who had killed Ammoron's brother Amalickiah, sneaked his way into the Lamanite camp. In his anger, he threw a javelin through the heart of Ammoron, killing him.
This woke Ammoron's servants, however, and Teancum was killed. Moroni was very sad that such a valiant true friend to liberty had died. The next morning, Moroni and the Nephites attacked and slaughtered a great many Lamanites. The rest of them fled and were driven out of the land, and they did not continue their attacks on the Nephites.
After an extremely long period of war and bloodshed, there was now finally peace in the land again. Helaman went forth among the people to preach and reestablish the church. After fortifying the Nephite cities near the borders of the Lamanite lands, Moroni retired to his home in Zarahemla to live out the rest of his days in peace. Within the next four years, Helaman and Moroni died.