In 898, Zeng Gun (曾袞) the prefect of Shao Prefecture (邵州, in modern
Shaoguan,
Guangdong) attacked Guang Prefecture, and was joined by the Guang Prefecture officer Wang Gui (王瓌, who commanded a fleet). Liu Yin defeated them, and when the Shao Prefecture officer Liu Tong (劉潼) subsequently attacked Zhen (湞州) and Han (浛州) (both in modern
Qingyuan,
Guangdong), Liu defeated and killed him. In 900, Emperor Zhaozong commissioned the
chancellor Xu Yanruo to replace Li Zhirou as military governor of Qinghai, but before Xu could get to Qinghai, Li died. When Xu arrived at Qinghai, he made Liu his deputy military governor and entrusted the affairs of the circuit to Liu. In 902,
Lu Guangchou the prefect of Qian Prefecture (虔州, in modern
Ganzhou,
Jiangxi) attacked Qinghai Circuit and captured Shao Prefecture and put Chao Prefecture (潮州, in modern
Chaozhou,
Guangdong) under siege, Liu defeated him and tried to recapture Shao. Liu Yan advised him not to, pointing out that Lu's army was still strong, but Liu Yin did not listen to him and attacked Shao anyway. At that time, the water level on the river was high, and Liu Yin was not able to get food supplies to the army on time. A counterattack by Lu and his officer
Tan Quanbo defeated him and forced his withdrawal, allowing Lu to retain Shao. In 904, by which time the powerful warlord
Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern
Kaifeng,
Henan) was in effective control of the imperial government, having assassinated Emperor Zhaozong and replaced him with his son
Emperor Ai, Liu Yin bribed Zhu and requested to be commissioned military governor. Zhu agreed, and Liu was subsequently given the military governorship. == As military governor ==