Liu Shan (207–271),
courtesy name Gongsi, was the second and last emperor of the state of
Shu Han during the
Three Kingdoms period. As he ascended the throne at the age of 16, Liu Shan was entrusted to the care of the
Chancellor Zhuge Liang and Imperial Secretariat
Li Yan. His reign of 40 years was the longest of all in the Three Kingdoms era. During Liu Shan's reign, many campaigns were led against the rival state of
Cao Wei, primarily by Zhuge Liang and his successor
Jiang Wei, but to little avail. Liu Shan eventually surrendered to Wei in 263 after
Deng Ai led a surprise attack on the Shu capital
Chengdu. He was quickly relocated to
Luoyang, capital of Wei, and enfeoffed as "Duke Anle". There he enjoyed his last years peacefully before dying, most probably of natural causes, in 271.