stylistic:tone, information:extraction, information:highlighting
War with Qing dynasty

Lê Chiêu Thống never abandoned his attempt to regain the throne. He hid in Bảo Lộc Mountain; in there, he had a plan to fight against Tây Sơn. His mother, Empress Dowager Mẫn, fled to Longzhou, called for help from Qing China in order to restore Lê dynasty. The Qianlong Emperor of Qing China decided to restore Lê Chiêu Thống to the throne, though under Qing protection.

Two Chinese armies invaded Vietnam in October of the lunar year Mậu Thân (November, 1788): Liangguang army under Sun Shiyi and Xu Shiheng, as the main force, marched across the South Suppressing Pass (present day Friendship Pass); Yungui army under Wu Dajing, marched across the Horse Pass (Maguan); the two armies aimed to attack Thăng Long directly.

When Liangguang army reached Lạng Sơn, Sun announced that there was a very large number of Qing army, in order to threaten Tây Sơn soldiers. Chinese marched south swiftly. Realizing Tây Sơn army could not stop Chinese army from marching to Thăng Long, Ngô Văn Sở accepted Ngô Thì Nhậm's idea, abandoned Thăng Long and retreated to Tam Điệp orderly. In Tam Điệp, Ngô Văn Sở sent Nguyễn Văn Tuyết to Phú Xuân to ask for aid.

Nguyễn Huệ knew the situation on Lunar 24 November (21 December 1788), cursing the invaders. Huệ declared that Lê Chiêu Thống was a national traitor and not qualified for the throne. In the next day, Nguyễn Huệ erected an altar on a hill south of Phú Xuân and proclaimed himself Emperor Quang Trung, in effect abolishing the Lê dynasty. After the coronation, he marched north with 60,000 soldiers. He recruited volunteers in Nghệ An Province, now the number of his soldiers reached 100,000. In Thọ Hạc (Thanh Hóa), he made an invigorating speech before his soldiers. Soldiers replied a great shout of approval. They were encouraged, and marched quickly.

Huệ arrived in Tam Điệp on Lunar 20 December (15 January 1789). In there, Huệ gathered together the whole forces, and divided them into five branches: main force led by Huệ, marched north to attack Thăng Long directly; a navy led by Nguyễn Văn Tuyết (Commander Tuyết), sailed from Lục Đầu River to attack Lê supporters in Hải Dương; another navy led by Nguyễn Văn Lộc (Commander Lộc), sailed from Lục Đầu River to attack Phượng Nhãn and Lạng Giang; a cavalry (including war elephants) led by Đặng Tiến Đông, marched to attack Cen Yidong in Đống Đa; another cavalry (including war elephants) led by Nguyễn Tăng Long (Commander Long) marched past Sơn Tây to attack Xu Shiheng in Ngọc Hồi (a place near Thanh Trì).

Meanwhile, Chinese soldiers were preparing to celebrate the Chinese New Year festival, and planned to march further south to capture Phú Xuân on 6 January of the next lunar year (31 January 1789). As Vietnamese New Year (Tết) was generally celebrated on the same day, Chinese generals assumed that Tây Sơn army would not attack in these days. However, subsequent events proved that they were wrong.

Nguyễn Huệ made a surprise and fast attack against Chinese forces during the New Year holiday. They reached Thăng Long in the night of 3 January of the next lunar year (28 January 1789). In the fierce 4-day battle, most of Chinese soldiers were unprepared, they were disastrously defeated by the Tây Sơn army in Ngọc Hồi and Đống Đa (part of modern Hanoi). Qing generals Xu Shiheng, Shang Weisheng, Zhang Chaolong and Cen Yidong were killed in action. Many Chinese soldiers and porters were killed in action, or drowned while crossing the Red River. According to Draft History of Qing, over half number of Chinese soldiers died in the battle. Sun Shiyi, the commander-in-chief of Chinese army, abandoned his army, fled for his life back to China with several soldiers. Lê Chiêu Tông also fled to China. Huệ marched into Thăng Long, his clothes was blackened by gunpowder. Tây Sơn army marched further north after the battle; they reached Lạng Sơn, and threatened to march across the border to arrest Lê Chiêu Thống.

After Nguyễn Huệ defeated the Later Lê dynasty, the last Lê emperor Lê Chiêu Thống and high ranking Lê loyalists fled Vietnam for asylum in Qing China and went to Beijing. Lê Chiêu Thống was appointed a Chinese mandarin of the fourth rank in the Han Yellow Bordered Banner, while lower ranking loyalists were sent to cultivate government land and join the Green Standard Army in Sichuan and Zhejiang. They adopted Qing clothing and adopt the queue hairstyle, effectively becoming naturalized subjects of the Qing dynasty affording them protection against Vietnamese demands for extradition. Some Lê loyalists were also sent to Central Asia in Urumqi. Modern descendants of the Lê monarch can be traced to southern Vietnam and Urumqi, Xinjiang.