In 1788, as Viceroy of Liangguang, he invaded Annam and reinstalled the emperor Lê Chiêu Thống, who had fled in fear of the rebel Nguyễn Huệ. His forces were beaten by the Tây Sơn armies, and it was ultimately decided to leave Annam alone. He was sent to Sichuan to see the supplies of the army fighting in Tibet, into which country he advanced over terrible mountains as far as Chamdo. In 1792, on the conclusion of the war with Nepal, the suppression of the White Lotus Rebellion occupied his last days. His physical powers were marvellous, and he required hardly any sleep. He was a great collector of ancient inscriptions. He was ennobled as Duke Mouyong of the First Class ().