Following Liu Yan's death in 194, Wu Yi continued serving under Liu Zhang, Liu Yan's son and successor as the Governor of Yi Province. Liu Zhang appointed him as a General of the Household (中郎將). Between 212 and 214, when the warlord Liu Bei attacked Liu Zhang in an attempt to seize control of Yi Province, Wu Yi fought on Liu Zhang's side and led troops to fight Liu Bei's forces at Fu County (涪縣; in present-day Mianyang, Sichuan). However, he surrendered to Liu Bei after being defeated.