The series is set in the late Tang dynasty of China. Li Shimin played a pivotal role in the battles leading up to the collapse of the Sui Dynasty, yet his father and founding Emperor Li Yuan, instead created his eldest son Li Jiancheng as the crown prince. The brothers' relationship quickly deteriorated, and Li Shimin ambushed and killed Li Jiancheng and younger brother Li Yuanji at Xuanwu Gate in 626. Wei Zheng served as advisor to Li Jiancheng during the princes' contention for power, yet was pardoned and later promoted to the position of left (senior) chancellor after impressing Li Shimin with his honest advice and constructive criticism. He works together with Li Shimin to create a flourishing Chang'an.