Liu Pi (劉闢) (died December 12, 806), courtesy name Taichu (太初), was an official of the Chinese dynasty Tang Dynasty. Early in the reign of Emperor Xianzong, he resisted imperial authority at Xichuan Circuit (西川, headquartered in modern Chengdu, Sichuan), and was defeated by imperial forces commanded by Gao Chongwen and executed.
It is not known when Liu Pi was born. During the middle of Emperor Dezong's Zhenyuan era (785-805), Liu passed the imperial examinations in the class of those who used language grandly. He was subsequently invited by Wei Gao, then the military governor (Jiedushi) of Xichuan Circuit to serve on Wei's staff. He was eventually promoted to be Zhidu Fushi (支度副使) — Wei's deputy in Wei's capacity as director of military supplies for Xichuan Circuit. It was in this capacity that, in 805, after Emperor Dezong's death and succession by Emperor Shunzong, Wei sent him to the capital Chang'an — to make contact with one of Emperor Shunzong's favorite officials, Wang Shuwen. He informed Wang that Wei wanted to control two neighboring circuits — Dongchuan (東川, headquartered in modern Mianyang, Sichuan) and Shannan West (山南西道, headquartered in modern Hanzhong, Shaanxi) as well, stating to Wang:
The Taiwei [(i.e., Wei)] sent me, Liu Pi, to show his good faith to you, Lord. If you give him the Three Chuans [(i.e., Xichuan, Dongchuan, and Shannan West)], he will assist you to his death. If you do not, he will repay you in other manners.
Wang, in anger, wanted to execute Liu, but was stopped by the chancellor Wei Zhiyi. When Wang subsequently exiled another regional staff member, Yang Shi'e (羊士諤), who was also in Chang'an to make demands for his supervisor, Liu became fearful and fled back to Xichuan. Subsequently, Wei submitted a petition to Emperor Shunzong, who was then seriously ill, condemning Wang and his associates, causing much apprehension among Wang and his associates. Wang lost power shortly after, and, later in the year, Emperor Shunzong yielded the throne to his son Li Chun the Crown Prince (as Emperor Xianzong).