Tangut movable-type craftsman Ahe travels to Lin'an, the Song capital. After seeing its advanced printing technology, he resolves to compile the Book of Western Xia Movable Type. He receives Zhao Wei's painting View of Mount Helan and returns to Western Xia. Together with his lover, Yelü Qiong, he compiles the scriptures. Princess Zhima of the imperial family falls for Ahe and threatens Yelü Qiong, forcing Ahe to marry her. When the Mongols invade Western Xia, they burn movable-type books and hunt down the craftsmen. To save Yelü Qiong, Ahe agrees to the marriage, but on his wedding day he is killed by the Mongol general Yesugei, who takes Zhima by force.
Pregnant Yelü Qiong flees with a Persian caravan. When Persia is conquered, she turns toward Dali. After Sophia is killed, she escapes to Tonghai with Hassan's help. Ahe's apprentice Tuoba Shi flees with A Duo and settles in Jianchuan. Zhima accompanies Yesugei on his campaigns, using her status to help refugees in Dali and Tonghai. Yelü Qiong gives birth to a son, A Nian, in Tonghai, and Zhima looks after them. To avenge herself, A Duo joins the remnants of Duan Cang's forces. When they are wiped out, she disfigures herself and becomes a nun, living undercover.
A Nian grows up to become a master craftsman in Yunnan and marries Zhima's daughter. Song official Zhao Wei is exiled to Yunnan to produce secret porcelain. He refuses to write a pledge of allegiance and dies for it. Yesugei and his wife plead on his behalf, but to no avail. When Zhima falls gravely ill, A Duo kills Yesugei as revenge while he is praying to Buddha. Before her death, Zhima asks to be buried according to Western Xia customs, with the painting View of Mount Helan as her grave offering. The people give her a Han-style funeral. A Nian's son goes on to achieve fame and success in the Yuan dynasty's civil service examinations.
Eight hundred years later, an archaeological team discovers movable type and fragments of scriptures in a Mount Helan cave. They decipher the code “star patterns mark the volume numbers, lotus patterns identify the groups,” overcome the challenge of restoring the movable type, and eventually uncover mulberry-paper scriptures inscribed with “Book of Western Xia Movable Type” at A Duo's pagoda in Tonghai, hoping to unravel the final secret of its transmission.