12-year-old Dre Parker and his mother Sherry move from Detroit to Beijing after Sherry gets a job transfer at her car factory. After a day in a Chinese park, Dre develops a crush on a young violinist, Meiying, who reciprocates his attention. Cheng, a rebellious kung fu prodigy whose family is close to Meiying’s, attempts to keep the two young ones apart by violently attacking Dre and later bullies him at school, as Dre is too weak to stand up for himself. During an attack one day, the maintenance man Mr. Han comes to Dre’s aid, revealing himself as an ancient kung fu master.
After Han mends Dre’s injuries using fire cupping, Dre asks if Mr. Han could teach him kung fu to get revenge on his attackers. Han refuses, but meets Cheng’s teacher Master Li to make peace. Li, who teaches his students to show no mercy to their enemies, insists that Han or Dre must fight his students. Seeing a poster for an open martial arts tournament, Han instead proposes that Dre compete against Li’s students there and also requests that the stronger students that Li teaches leave Dre alone to train in time for the tournament, in hopes Dre will no longer be bullied. Li accepts the offer, but tells Han that if Dre does not show up, there will be trouble for both Han and Dre.
Han promises to teach Dre “real” kung fu and begins to train Dre by emphasizing movements that apply to life in general, and that serenity and maturity, not punches and power, are the true keys to mastering the martial art. He teaches this by having Dre go through various actions with his jacket, which teaches Dre muscle memory moves. Han then takes Dre to a divine temple in the Wudang Mountains where he trained with his father years ago, and Dre witnesses a woman making a king cobra reflect her movements. He drinks the water from a secret, ancient Chinese well for good luck.
During the course of their training, Han gives Dre a day off and, as Dre’s relationship with Meiying continues, he persuades her to cut school for a day of fun. However, when Meiying is nearly late for her violin audition which was brought forward a day without their knowledge, her parents deem Dre a bad influence, forcing Meiying to end her friendship with him. Dismayed, Dre goes to Han that night, only to find him smashing a car he was working on, apparently drunk. Han tells Dre that he crashed the same car years ago during a dispute with his wife, and that his wife and ten-year-old son were with him and died in the car crash. Han fixes the car every year but smashes it to help him remember the day they died. Dre works much harder in his training in order to help Han get over the incident. Han assists Dre in reading a note of apology to Meiying’s father in Chinese; impressed and forgiving, he accepts and promises that Meiying and her family will attend the tournament to support Dre.