After Confucius returned to the State of Lu, he continued teaching his students. Since the reign of Duke Xuan, the Lu ruling house had declined in power, with political authority falling into the hands of the "Three Huan" families, led by the Ji family. In the early years of Duke Zhao, these three families further divided the military power of the Lu ruler. In the twenty-fifth year of Duke Zhao of Lu (517 BCE), during the annual ancestral rites, the ruling Ji family removed the dance troupe assigned for Duke Zhao's sacrifice, leaving only two dancers, while using thethe Son of Heaven's exclusive eight-row dance (Bayi) at their own ancestral temple and singing the Yong hymn, which only the Son of Heaven could use during ancestral offerings. Upon hearing this, Confucius was deeply indignant, believing that Ji, as a grand master, had violated Li (Propriety) by presumptuously using the eight-row dance, saying, "If this can be tolerated, what cannot be tolerated?" Confucius also quoted an ancient poem: "Assisted by the princes, the Son of Heaven stands solemn and majestic," meaning that when the national music Yong was played, the Son of Heaven stood in the center, with the princes (vassals) flanking him, and then the Son of Heaven walked through. Because the Son of Heaven symbolized the state, his demeanor was extremely solemn, and he never looked around carelessly. Yet now the three powerful ministers—Mengsun, Zhongsun, and Jisun—presumptuously used this solemn national music meant for the Son of Heaven for private feasts at home; one could not fathom their intentions. The Ji family's arrogance and "violation of Li" also aroused discontent among the court officials of Lu. Duke Zhao sought to weaken and even eliminate Ji Pingzi to restore ducal power. Coincidentally, a dispute arose between Ji Pingzi and another noble, Hou Zhaobo, over cockfighting. Duke Zhao exploited this conflict, secretly plotting with Hou Zhaobo and Zang Zhaobo, and sent troops to besiege Ji Pingzi's residence. Ji Pingzi climbed a high platform and begged Duke Zhao for mercy, but was refused. He then requested to be imprisoned in Fei, but Duke Zhao also disagreed. He further asked for five chariots to flee, but was still denied. Later, fearing that Ji Pingzi's downfall would also ruin them, the other two of the "Three Huan," Mengsun and Shusun, sent troops to aid Ji Pingzi in attacking Duke Zhao. Duke Zhao suffered a major defeat and was forced to flee to the State of Qi. Amidst this chaotic internal strife in Lu, Confucius left Lu for Qi.
