Dao Ma Jing Wu, a seasoned bounty hunter during the Sui dynasty, travels with his nephew Xiao Qi. After a stop in a small village, he accepts a bribe from his target and is approached by Governor Chang to become the new martial arts instructor for his troops. Dao Ma declines, despite being offered a valuable sword, weary of palace politics.
In another village, Dao Ma and Xiao Qi lodge at a modest inn run by an innkeeper and his family. Governor Chang's men extort the innkeeper, who is revealed to be the infamous swordsman known as the Two-Headed Snake Jin Zhang. Dao Ma is irritated by Chang's interference and suspects the governor wants to force him to train his troops. The Two-Headed Snake and Dao Ma unite, defeating Chang, and appear to kill him, though the Two-Headed Snake himself perishes. Dao Ma grabs his nephew and flees as Chang's troops close in, cementing his status as the land's most wanted criminal.
Dao Ma seeks refuge in the Mojia Village, where the fierce Ayuya and her followers help repel Chang's soldiers. Ayuya is the chieftain's daughter and longs to reach the great city of Chang'an, but Dao Ma keeps her at a distance. Lao Mo, the village chieftain who has helped Dao Ma in the past, asks for a favor in return: escort the revolutionary Zhishilang to safety before time runs out at the Emperor's checkpoints. Zhishilang argues for equality, lifting his bounty to a level higher than Dao Ma's own.
Dao Ma agrees to the journey, yet Ayuya and her friend Ani insist on coming along. Lao Mo consents, and Dao Ma reluctantly agrees to take Ayuya to Chang'an, partly to keep her safe. Unbeknownst to him, Lao Mo also hopes to shield Ayuya from He Yixuan, who still pursues her after canceling their arranged marriage. He Yixuan is a rising force among the clan leaders, and he seeks to bend others to his will. At the inn, warriors Diting and One-eye arrive and massacre some of Chang's troops, hunting Dao Ma for reasons that remain unclear. While on horseback, the group is attacked by bounty hunters and Chang's men. They are forced to share a carriage with Shu, a crafty bounty hunter who guards Yan Ziniang, a skilled captive with a heavy bounty. Shu, aiming to become the greatest swordsman, tricks the group into taking a shortcut to ambush them, hoping to claim multiple bounties.
Dao Ma defeats Shu in an oil-field duel and spares him, allowing him to continue the journey. Back in the political arena, He Yixuan persuades other clan leaders that someone is aiding Zhishilang and tries to secure their fealty to Pei Zhiju Yi Zhang, who now commands the troops. Lao Mo refuses, and He Yixuan brings in mercenaries to bolster his force, threatening Mojia Village and Ayuya.
Mojia Village faces a brutal assault as mercenaries and He Yixuan sweep in. He Yixuan holds Ayuya at risk while Ani fights valiantly but is overpowered. Dao Ma returns with Zhishilang, and a prisoner swap is demanded at the gates; He Yixuan pretends not to need Zhishilang alive but relents and swaps out a captive. Dao Ma sends Zhishilang forward, only to reveal that the other exchanged prisoner is Ani, mortally wounded. Dao Ma and Shu fight through the village as He Yixuan slaughters civilians and Pei Shiju abandons command to join the defense.
The tide shifts when the mercenaries receive new orders to withdraw, and Ayuya successfully persuades Wululu, the slow-witted son of a clan leader, to release her. In a flashback, Diting, One-eye, and Dao Ma once formed an elite squad; after Xiao Qi was born, Dao Ma's sister and nephew were ordered killed. Diting saved them, and the Emperor ordered the squad dissolved except for Diting and One-eye to keep searching for Xiao Qi. Dao Ma refuses to surrender him and battles Diting; Shu defeats One-eye, and ultimately Dao Ma impales Diting with a sword, sacrificing himself. He then finds Ayuya, who kills He Yixuan.
Wounded but alive, Dao Ma heals and rides off into the horizon with Xiao Qi, Shu, Zhishilang, and Yan Zhiniang.