Liu Youqiu was born in 655, during the reign of . His family was from Ji Prefecture . During the ''Shengli'' era of Emperor Gaozong's wife Wu Zetian, Liu passed the imperial examinations and made the sheriff of Langzhong County . The prefect of the prefecture Langzhong was in, however, did not respect him, and he, in frustration, left his post. Some time later, he was made the sheriff of Chaoyi County , a post that he was serving at as of 705, when Wu Zetian was overthrown in a coup and her son, the Crown Prince, a former emperor, was restored to the throne . For some time, the key officials in power were the coup leaders Zhang Jianzhi, Cui Xuanwei, Huan Yanfan, Jing Hui, and Yuan Shuji. Liu tried to warn Huan and Jing that Wu Zetian's nephew Wu Sansi the Prince of Liang posed a threat to the coup leaders and should be killed, but they did not listen to him. Soon thereafter, Wu Sansi, who carried on an affair with Emperor Zhongzong's powerful wife , became a trusted advisor to Emperor Zhongzong, and the coup leaders were exiled and eventually died or killed in exile.
Involvement in coup of 710
In 710, Emperor Zhongzong died suddenly -- a death that traditional historians believed to be a poisoning carried out by Empress Wei and her daughter Li Guo'er the Princess Anle, so that Empress Wei could become "emperor" like Wu Zetian and Li Guo'er could become crown princess. For the time being, Emperor Zhongzong's son by a concubine, the Prince of Wen, was made emperor , and Empress Wei retained power as empress dowager and regent. She viewed Emperor Zhongzong's brother the Prince of Xiang and sister Princess Taiping as threats, and considered killing them. Meanwhile, Princess Taiping and Li Dan's son the Prince of Linzi heard news of this, and therefore considered acting first. They, along with Princess Taiping's son Xue Chongjian , Zhong Shaojing, Wang Chongye , Liu, and Ma Sizong , planned a coup, and soon launched it, with support from imperial guard soldiers disgruntled at harsh treatment by their commanders Wei Bo and Gao Song , Empress Wei's nephews whom she had put in charge. During the coup, Liu was responsible for writing some 100 declarations for Li Longji, as he attended to Li Longji throughout the night of the coup. The coup was successful, and Empress Wei and Li Guo'er were killed. Li Dan was made regent, and for his contributions in the coup, Liu was made ''Zhongshu Sheren'' , a mid-level official at the legislative bureau , and given the designation ''Canzhi Jiwu'' , making him a ''de facto''. He was also created the Baron of Zhongshan. Two of his sons were given honors, and his grandfather and father were posthumously honored.
During Emperor Ruizong's second reign
Several days after the coup, Li Dan, at the urging of Princess Taiping, Li Longji, and Li Longji's brother Li Chengqi the Prince of Song, retook the throne , displacing Emperor Shang. Once Emperor Ruizong took the throne, Liu received further promotions and honors -- he was given the honorific title ''Yinqing Guanglu Daifu'' ; made ''Shangshu You Cheng'' , a secretary general at the executive bureau ; and created the Duke of Xu. He continued to serve as chancellor, and was given awards of silk, servants, a mansion, land, horses, and other assorted treasures. As Li Chengqi was older than Li Longji and was born of Emperor Ruizong's deceased wife , but Li Longji had the great achievement during the coup, Emperor Ruizong initially hesitated at deciding whom to make crown prince. It was based on Li Chengqi's repeated offers to yield and Liu's urging, pointing out that Li Longji was brave and able, that Emperor Ruizong decided to create Li Longji crown prince.
In 711, as part of a governmental reorganization that evolved out of a power struggle between Li Longji and Princess Taiping -- as Zhang Shuo and Song Jing had tried to remove Princess Taiping's influence from government but failed -- Zhang and Song were demoted, and Liu was also removed from being a chancellor, becoming the minister of census instead. Later in the year, when he was referred to as the minister of civil service affairs , another major governmental reorganization saw him made ''Shizhong'' , the head of the examination bureau , a post considered one for a chancellor. Further, Emperor Ruizong issued an edict that stated that Liu would be pardoned from death 10 times.
In 712, after Li Jin the prefect of Yan Prefecture submitted a false report to Liu about Xue Na the commandant at You Prefecture , under whom Li Jin was serving, Liu recommended that Xue be replaced by the general Sun Quan . Subsequently, Sun took an overly aggressive stance against Xi chiefain Li Dabu , and was defeated by Li Dabu, at great human cost.
During Emperor Xuanzong's reign
Later in 712, Emperor Ruizong passed the throne to Li Longji, who took the throne as Emperor Xuanzong. However, at Princess Taiping's urging, Emperor Ruizong retained most imperial powers as ''Taishang Huang'' . Liu Youqiu continued to serve as chancellor, and was soon given the post of ''You Pushe'' , one of the heads of the executive bureau, along with the chancellor ''de facto'' designation of ''Tong Zhongshu Menxia Sanpin'' .
Meanwhile, Princess Taiping continued to be highly influential in governmental matters through Emperor Ruizong, and most chancellors were her associates. Liu and the general Zhang Wei , with Emperor Xuanzong's approval, planned to mobilize the imperial guards to kill several of those chancellors -- Dou Huaizhen, Cui Shi and Cen Xi. However, after Zhang told the plan to the imperial censor Deng Guangbin , the news was leaked. Liu was arrested, and initially set to be executed. Emperor Xuanzong interceded on his behalf with Emperor Ruizong, and Liu, Zhang, and Deng were spared but exiled -- in Liu's case, to Feng Prefecture . Cui subsequently gave instructions to Zhou Lizhen the commandant at Guang Prefecture , under whose area of responsibility Feng Prefecture was, to have Liu killed. Liu's friend , who was then the commandant at Gui Prefecture , heard of this secret instruction, and therefore, when Liu went through Gui Prefecture, detained him and refused to let him go on to Feng Prefecture. Zhou submitted accusations that Wang was disobeying an imperial edict, and Cui repeatedly tried to pressure Wang to release Liu to Feng Prefecture. Liu himself pointed out to Wang that he did not want to put Wang in danger as well, but Wang refused to let Liu go on, and Liu was spared from death.
In 713, after receiving a report that Princess Taiping and her partisans were planning to overthrow him, Emperor Xuanzong acted first, killing her associates and forcing her to commit suicide. He recalled Liu from exile and made him ''Zuo Pushe'' , also head of the executive bureau, and gave him the chancellor ''de facto'' designation of ''Pingzhang Junguo Dashi'' and later again ''Tong Zhongshu Menxia Sanpin''. He also restored the title of Duke of Xu, stripped from Liu when Liu was exiled, and further gave Liu the honorific titles of ''Jinzi Guanglu Daifu'' and ''Shang Zhuguo'' . He also put Liu in charge of editing the imperial history. Later that year, when Emperor Xuanzong was poised to execute the chancellor Guo Yuanzhen due to the disorganization of the imperial guards, it was the urging of Liu and Zhang Shuo that Guo was not executed. Late that year, Liu again became ''Shizhong'', although he was soon removed from the chancellor position altogether when Zhang was replaced with Yao Chong. Instead, he became ''Taizi Shaobao'' , an advisor to the crown prince.
Nevertheless, Yao was still jealous of Liu's close relations with Emperor Xuanzong, and in 714 he accused Liu and Zhong Shaojing of complaining that they were not given important posts despite their contributions. Despite Liu's and Zhong's denials, they were still demoted -- in Liu's case, to be the prefect of Mu Prefecture . He was soon promoted to a slightly larger prefecture -- Hang Prefecture , but in 715 was demoted to a farther prefecture, Chen Prefecture . He was upset over the demotion, and he died on the way there. Emperor Xuanzong honored him posthumously and gave him the posthumous name Wenxian , and had Liu worshipped at the temple of Emperor Ruizong.