|"The peasants felt that the Earth King's role was outdated and that he did not represent their interests. So they stormed the Upper Ring."|
|— Avatar Kyoshi to Aang.|
The peasant uprising was a rebellion of Ba Sing Se's peasant population, instigated by the notion that the Earth King's rule was outdated and that he did not represent the interests of his people. Avatar Kyoshi ended the conflict, changed the Earth Kingdom into a constitutional monarchy, and created the Dai Li as a safeguarding measure for the future.
In the late 4th and early 3rd century BG, the Earth Kingdom experienced a period of great instability and political decline. Rebellions affected rural areas, corruption escalated in scope, the country's royal family was destabilized by brutal infighting for years, and a large part of the political elite was murdered in 296 BG. This unrest led Earth Kingdom officials to focus on their own safety and interests, neglecting their duties. Avatar Kyoshi worked hard to alleviate the crisis, but her efforts often produced only partial or temporary successes, as corrupt and power-hungry parts of the elite expolited her achievements for their own gain. The trust of the Earth Kingdom's population in the monarchy fell to an all-time low.
Even the long-existing stability of Ba Sing Se was threatened by these developments. As Kyoshi tried to hunt down the most dangerous and violent daofei groups in the Earth Kingdom's rural areas, their remnants fled to the Earth Kingdom capital. Up to this point, daofei had never managed to establish a foothold in the great city, but this time they dug in and established a lasting presence despite the Avatar's efforts to root them out. The growing power of criminal groups worsened the situation of Ba Sing Se's already struggling commoners. Instead of combating the suffering, however, Earth King Yi Ming focused on large-scale public works such as the monorail and improving security by any means neccessary. Even though his projects were visionary, Yi Ming's efforts often led to even greater immediate problems for Ba Sing Se's poor, as their homes were demolished to make room for the monorail and his law enforcement abused them in search for criminals and rebels. The growing opposition to the monarchy manifested in plots like the one by a daofei group, the Paper Knives, that intended to attack Yi Ming.
By 270 BG, the 46th Earth King had risen to power. He was a tyrannical and unpopular ruler whose high-handed style of governance was exploited by a highly capable warlord from the northwestern Earth Kingdom, Chin. He launched a military campaign to take power for himself, plunging the entire Earth Kingdom into civil war; only Kyoshi's peninsula and Ba Sing Se remained under the Earth King's dominion. When Chin threatened Kyoshi's peninsula, Kyoshi used the Avatar State to split her home away from the peninsula, creating Kyoshi Island. In the process, Chin fell to his death when the edge of the newly created cliff crumbled under his feet.
Although the Earth Kingdom was subsequently freed from the threat of Chin the Conqueror, the 46th Earth King had proven incapable of leading his people or handling the war effectively. Chin had also gained popularity during his time as a warlord, and those who had supported his actions were resentful of the Earth King and still determined to remove him from power. The long-simmering anger of the lower-class citizens of Ba Sing Se finally boiled over, and they revolted against the government.
The peasants declared that the king's rule was outdated and that he did not represent their interests, feeling that it was time for a "new government". They formed an angry mob and swarmed the Upper Ring of Ba Sing Se, destroying priceless historical artifacts and buildings that represented the "old government". Unable to handle the revolt, the Earth King summoned Avatar Kyoshi to the capital to aid him and bring the revolt to an end. He commanded her to squash the unruly peasants and subdue the revolt in any way she could, but she promptly refused.
Furious about the fact that Kyoshi, an Earth Kingdom citizen, dared to defy her king, he ordered her arrest; however, the Royal Earthbender Guards were no match for the Avatar, as Kyoshi easily brushed them aside with her earthbending. Enraged by the king's actions, Kyoshi asked him in return how he dared to defy his Avatar and proposed a compromise. According to Kyoshi, the king needed to listen to the peasants' grievances, as it was important that everyone in the Earth Kingdom had a voice in order for balance to prevail over tyranny. In return, she promised to protect the king's interests and Ba Sing Se's cultural heritage. Powerless against the might of the Avatar, the king complied and gave in to Kyoshi's request.
Together, the 46th Earth King and Kyoshi drafted a new constitution for the Earth Kingdom which limited the monarchy's power and strengthened the rights of the commoners. Kyoshi also began to train an elite force of earthbenders in the art of stealth, silence, and precision, a group that would later be known as the Dai Li. This force would serve to protect the monarchy's interests. With their aims at least partially achieved, the peasants dispersed and the uprising ended soon after. Order was finally restored to Ba Sing Se.
The new constitution was beneficial in many ways during the near two centuries that Kyoshi lived after helping to draft and implement it. For the rest of her life, Kyoshi helped maintain the peace between not just the four nations, but the internal peace between the fifty-five states of the Earth Kingdom. Bureaucratic policies were implemented to uplift the poorest in society, and the nation and the rest of the world entered a time of unprecedentedly long peace and prosperity. After her death, the nation's sages tried to maintain the peace for some time.
When she first created the organization, Kyoshi had no idea that the Dai Li would eventually become some of the most corrupt earthbenders in the world, abusing their powers in order to suppress instead of protect the citizens of Ba Sing Se. When the sages spoke out against the Earth King Jialun manipulating the constitution for his own benefit and trying to undo the limitations opposed on his predecessors, the Dai Li followed the king's orders to purge them all in an event known as the Night of Silenced Sages. The progress from Kyoshi's life was quickly undone, and the government began to grow exceedingly corrupt once more, subjugating and extorting the people of the Earth Kingdom.
By the reign of the 52nd Earth King, the Dai Li had become corrupt to the point of launching a conspiracy to silence any citizen from speaking about the Hundred Year War, especially to the king. The Dai Li eventually betrayed their nation in a successful coup orchestrated by the Fire Nation Princess, Azula, in which they arrested the entire Council of Five and allowed Fire Nation soldiers access into the city by destroying the two great walls that had protected Ba Sing Se for over a century.