The entire plot of "Mulan" hinges on her successful deception and eventual revelation. After taking her father's conscription notice, Mulan transforms herself into "Ping" and joins the army. Under Captain Li Shang's command, she becomes a skilled warrior. The first major turning point occurs during a battle in a snowy mountain pass. The Imperial army is ambushed by Shan Yu's entire Hun force. Using her quick thinking, Mulan fires their last cannon at the mountain, triggering a massive avalanche that buries the Hun army. In the process, she sustains a sword wound from Shan Yu.
This injury leads to the film's pivotal twist: while being treated, her identity as a woman is discovered. According to Imperial law, impersonating a soldier is a capital offense. Instead of executing her, Shang spares her life to repay his debt to her for saving him from the avalanche, but he expels her from the army, leaving her behind. As Mulan despairs, she discovers that Shan Yu and a handful of his elite warriors have survived the avalanche and are heading to the Imperial City to capture the Emperor. She races to the capital to warn Shang, who initially dismisses her. The Huns succeed in seizing the palace, but Mulan, using her intelligence, enlists her friends Yao, Ling, and Chien-Po to disguise themselves as concubines. They infiltrate the palace, defeat the guards, and rescue the Emperor. In a final climactic duel on the palace roof, Mulan outwits Shan Yu, pinning him with his own sword and using a large firework rocket, launched by Mushu, to kill him. The Emperor and all of China bow to her in honor. She returns home not with shame, but as a national hero.