 His mother was Lady Wang (王貴人), a former servant of Liu Shan's first wife Empress Jing'ai; Lady Wang later became one of Liu Shan's concubines.Liu Xuan became crown prince in 238.After the fall of Shu to the rival state of Wei, Liu Xuan and his surviving brothers returned to the capital, Chengdu.