Liu Ba 劉巴 (d. 222), courtesy name Zichu 子初, was a civilian officer of Liu Bei 劉備 (161-222), the founder of Shu-Han 蜀漢 (221-263), one of the Three Empires 三國 (220~280 CE).
He hailed from Chengyang 蒸陽 (today's Hengyang 衡陽, Hunan), but earned a good reputation as a young man who diligently worked as a recorder in the financial department of the local commandery.
When the Eastern Han dynasty 東漢 (25-220 CE) fell apart, he refused Liu Biao's 劉表 (142-208) offer to serve him, and decided to become an official under the warlord Cao Cao 曹操 (155-220), who made him a clerk (yuanli 掾吏), and entrusted him diplomatic mission to the southern regions of Han China like Changsha 長沙 (today in Hunan), Guiyang 桂陽 (Binxian 郴縣, Hunan), Lingling 零陵 (Hunan) and Jiaozhi 交址 (Guangzhou).
When Liu Bang conquered Sichuan, Liu Ba decided to changed sides and was promptly made western section clerk of the Left General (zuo jiangjun xi caoyuan 左將軍西曹掾) of Liu Bei. In 219, when Liu Bang adopted the title of King of Hanzhong 漢中, Liu Ba was made Director of the Royal Secretariat (shangshu ling 尚書令), a function in which he drafted the most important edicts and commands of Liu Bei.
Liu Ba was acknowledged as an upright, honest, and intelligent person and was highly admired by Counsellor-in-chief Zhuge Liang 諸葛亮 (181-234).