 In 263, Tian Xu participated in the campaign against Wei's rival state, Shu Han, as an officer under the Wei general Deng Ai.When Deng Ai and the Shu general Jiang Wei were locked in a stalemate at Jiange (劍閣), Deng Ai decided to take a shortcut from Yinping (陰平) to Jiangyou (江油) to bypass Jiang Wei's defences.Tian Xu disobeyed Deng Ai's orders when he refused to advance, so Deng Ai wanted to execute him.