The battle between Oogway and Kai was the confrontation of the two brothers-in-arms, which took place five-hundred years prior to the events in Kung Fu Panda 3. The battle occurred when the two friends differed in their ambitions of how to use the power of chi, Oogway wanting to use it for good, and Kai wanting to take the chi of others to increase his own power.
Oogway and Kai were once brother-in-arms leading a great army together. One day, they were ambushed by an enemy army and Oogway was badly injured. Kai then carried his friend for days searching for help, until they came to a secret village of pandas high in the mountains. The pandas used the power of chi to heal Oogway, who became fascinated by the power and began learning how to use the technique from the pandas.
However, Kai was envious and wanted the power all to himself. He quickly developed the technique to take chi from others rather than give it, and began stealing the chi of the pandas to increase his own power.
Seeing the danger his friend's obsession would cause, Oogway broke off his relationship with Kai and confronted him before he could continue his taking of chi. Furious at Oogway's intervention, Kai attacked his former friend and the two engaged in combat, Oogway armed with a staff and Kai armed with a double-bladed spear.
The battle was long, fierce, and "earth-shaking", but in the end, Oogway prevailed, breaking Kai's spear and banishing him body and soul to the Spirit Realm for all eternity.