Ding used to be a kung fu student, but as he became evil, he destroyed on those who taught him. His story began a long time back, when Oogway saw his talent in magic arts and sent him to study with some monks atop of Mugu Mountain, but Ding was impatient and turned on his teachers, hypnotizing them with his spirit orbs and using pure focus to drive them to their demise. Ding began mentally attacking people with his orbs, but before he could control the Valley of Peace, the Jade Palace masters ended his reign of terror. They imprisoned him in a castle on the mountain for life. Soon afterwards the orbs were confiscated and were locked up in the Jade Palace. Without the orbs, Ding was powerless and according to legend his angry ghost was still trapped inside the castle. Years passed and Ding was forgotten.
Po and Tigress accidentally released the Orbs that head to Ding's prison. After getting there, they end up dealing with Master Ding's ghost who gives them a hard time. Ding possesses Po's body to regain a physical form and then exits his prison. Soon though, Tigress gains control of the spirit orbs (much to Ding's dismay) and uses them to enter Po's mind to fight Ding. Po and Tigress are finally able to exorcise Ding's spirit from Po's consciousness. Tigress puts the orbs back and tells Po she is sorry, indicating they both have different strengths