Ma Sui (; 726 – September 4, 795), courtesy name Xunmei (), posthumous name Prince Zhuangwu of Beiping (), was a Chinese military general and politician of the Tang dynasty. He was known mostly for his battles against the rebel generals Li Lingyao (), Tian Yue, Zhu Tao, and Li Huaiguang.

Background and early career Ma Sui was born in 726, during the reign of Emperor Xuanzong. His family was from Ru Prefecture (汝州, in modern Pingdingshan, Henan)Old Book of Tang, vol. 134 . and claimed to be descended from the royal house of the Warring States period state Zhao. Its traceable family line came from Ma Sui's great-great-great-grandfather Ma Xiu (), who served as an official of Northern Zhou. Ma Sui's direct male-line ancestors, including his great-grandfather Ma Juncai (), grandfather Ma Wen (), and father Ma Jilong (), all served during the Tang dynasty.New Book of Tang, vol. 72. Ma Wen did not carry a high office, having served only as high as a supply officer for one of the imperial guard corps, but Ma Jilong had passed a special imperial examination for the military strategy works of Sun Tzu and Wu Qi and later served as a prefectural prefect and military commander at You Prefecture (幽州, in modern Beijing). When Ma Sui himself was young, on one occasion, when he was studying with his older brothers, he stated, "There will surely be disturbances in the realm. A real man should have accomplishments that helps the people throughout the realm, and how can he sit idly by to be merely a Confucian scholar?" As he grew, it was said that he had an unusual appearance, was tall, calm, brave, and intelligent. He was well-learned, particularly in the matters of military strategy.

In 755, the general An Lushan rebelled against Emperor Xuanzong's reign at Fanyang (范陽, i.e., You Prefecture), and soon advanced south to capture territory under imperial control and declare himself as emperor of a new state of Yan. He left his subordinate Jia Xun () in charge of Fanyang. Ma Sui, who was then at Fanyang, tried to persuade Jia to turn against An. Jia was impressed with Ma, but could not make up his mind. The proposal was leaked, however, and An sent his subordinate Han Chaoyang () back to Fanyang and killed Jia. Ma fled Fanyang and was hidden by the hermit Xu Yu () in the mountains to the west of Fanyang. After Ma hid there for a month, he left and joined the Tang resistance army at Pingyuan (平原, roughly modern Dezhou, Shandong) under Yan Zhenqing. After Pingyuan fell to Yan troops, Ma fled to Wei Commandery (魏郡, in modern Handan, Hebei). Nothing in his official biographies indicated what his activities were for the rest of the Anshi Rebellion.New Book of Tang, vol. 155 .

During Emperor Daizong's reign During the Baoyin era (762–763) of Emperor Xuanzong's grandson Emperor Daizong, near the end of the Anshi Rebellion, Li Baoyu, the military governor (jiedushi) of Zelu Circuit (澤潞, headquartered in modern Changzhi, Shanxi), made Mao Sui the sheriff of Zhaocheng County (趙城, in modern Linfen, Shanxi). After the end of the Anshi Rebellion with the death of Yan's last emperor Shi Chaoyi in 763, the Huige troops under its Dengli Khan Yaoluoge Yidijian (), who were in Tang lands to help with the efforts against Yan, were returning home, and on the way, they went through Tang territory without any regards for Tang local officials, killing and pillaging at will. When they were set to pass through Zelu Circuit, Li Baoyu could find no subordinates willing to be in charge of welcoming the Huige troops. Ma volunteered, and, before Huige troops arrived, he first gave gifts to their commanders. The commanders, in return, issued orders authorizing Ma to punish Huige soldiers not following orders. Ma then, as the Huige troops were arriving, had several prisoners who were already sentenced to death dressed up as his own attendants, and, if they even disobeyed his orders in any minor manner, he had them beheaded in the Huige soldiers' presence. Subdued by this display, the Huige soldiers, as they went through Zelu Circuit, were willing to abide by regulations. This impressed Li Baoyu greatly. Ma then further warned Li Baoyu that he believed the major general Pugu Huai'en, who had accepted the surrenders of four major Yan generals at the end of the Anshi Rebellion (Li Huaixian, Xue Song, Li Baochen, and Tian Chengsi) and had recommended that they be allowed to remain as military governors, and who was also Yaoluoge Yidijian's father-in-law, might be intending to rebel and having designs on Zelu and Hedong (河東, headquartered in modern Taiyuan, Shanxi) Circuits. He recommended precautions, and Li Baoyu agreed.Zizhi Tongjian, vol. 222. Subsequently, when Pugu did rebel, he sought food supplies from Xue. Li Baoyu sent Ma to persuade Xue not to cooperate with Pugu, and Xue turned against Pugu. As a result, Ma was promoted.

Later, Ma served as the prefect of Zheng Prefecture (鄭州, in modern Zhengzhou, Henan). He encouraged agriculture and reduced taxes, reforms that were much appreciated by the people. In 769, he was made the prefect of Huai Prefecture (懷州, in modern Jiaozuo, Henan). He was able to comfort the people despite a devastating drought at the time. Later, as Li Baoyu had also been made the military governor of Fengxiang Circuit (鳳翔, headquartered in modern Baoji, Shaanxi), on the western border with Tufan, Ma was made the prefect of Long Prefecture (隴州, in modern Baoji). There was an old road to the west of the prefectural capital that enabled Tufan troops to advance easily on incursions, and within eight days, Ma placed boulders and planted trees to seal the road, and further set up two defensive gates on the road. On an occasion when Li Baoyu went to the capital Chang'an to pay respect to Emperor Daizong, Ma accompanied him, and Emperor Daizong, believing that Ma was able, made him the prefect of Shang Prefecture (商州, in modern Shangluo, Shaanxi) and put him in charge of the supply lines going through Shang Prefecture.

In 775, the soldiers stationed at the important base Heyang (河陽, in modern Jiaozuo, Henan) mutinied and expelled their commander Chang Xiuming (). Emperor Daizong made Ma the commander of Heyang to replace Chang. In 776, following the death of Tian Shenyu () the acting military governor of Biansong Circuit (汴宋, headquartered in modern Kaifeng, Henan), Tian's subordinate Li Lingyao seized the control of the circuit. Initially, Emperor Daizong tried to appease Li Lingyao by making him the acting military governor, but after Li Lingyao continued to be defiant of imperial authorities, Emperor Daizong commissioned Ma, Li Zhongchen, Li Mian, assisted by Chen Shaoyou () and Li Zhengji, to attack Biansong. In fall 775, Ma and Li Zhongchen rendezvoused at Zheng Prefecture. Li Lingyao launched a surprise attack against their forces and causing them to withdraw; a large portion of Li Zhongchen's army, from Huaixi Circuit (淮西, headquartered in modern Zhumadian, Henan), deserted, while the people of Zheng Prefecture panicked and fled to the eastern capital Luoyang. Li Zhongchen wanted to retreat, but Ma opposed, stating, "We are regular troops attacking rebels. Why do we worry about defeat? Why do we give us this chance for battlefield accomplishments?" He dug in, and in response, Li Zhongchen gathered his soldiers and also dug in. They then moved toward Bian Prefecture, with Ma marching north of the Bian River (a canal connecting the Yellow River and the Huai River, flowing through Bian Prefecture) and Li Zhongchen marching south of the Bian River. They were joined by Chen's forces, and together they battled Li Lingyao's forces to the west of Bian Prefecture's capital, defeating Li Lingyao. Li Lingyao withdrew within the capital, and Ma and Li Zhongchen put it under siege. After they further defeated relief forces commanded by Tian Yue (the nephew of Tian Chengsi, who was allied with Li Lingyao), Li Lingyao fled but was eventually captured by Li Mian's forces and delivered to Chang'an to be executed. Ma, knowing that Li Zhongchen was fierce and cruel, decided not to contend with Li Zhongchen as to the credits for the victory and therefore refused to enter Bian Prefecture's capital. Li Zhongchen entered Bian Prefecture and, on his subsequent reports, credited only himself, as Ma predicted, going as far as killing the Biansong general Li Senghui (), who had turned against Li Lingyao and who also contributed much to the victory.Zizhi Tongjian, vol. 225.

During Emperor Dezong's reign

Campaign against Tian Yue In 779, Emperor Daizong died and was succeeded by his son Emperor Dezong. Shortly thereafter, Ma Sui was made the acting military governor of Hedong Circuit and the mayor of Taiyuan Municipality. Hedong Circuit had recently (in 778) suffered a major defeat against Huige forces, and its army was weak at the time. Ma carried new recruitment for cavalry soldiers from the rank of the officers' horse carers, built new battle wagons, and conducted rounds of battle training, thus rebuilding the Hedong Army within the span of a year. In 781, he was at Chang'an to pay homage to Emperor Dezong, when he warned Emperor Dezong that Tian Yue, who had succeeded Tian Chengsi as the military governor of Weibo Circuit (魏博, headquartered in modern Handan) in 779 and taken a conciliatory and submissive posture toward the imperial government, would nevertheless rebel eventually and that precautions needed to be taken.

Meanwhile, in 781, Li Baochen and Li Zhengji died, and their sons Li Weiyue and Li Na requested to succeed their fathers, to be military governors of Chengde (成德, headquartered in modern Shijiazhuang, Hebei) and Pinglu (平盧, headquartered in modern Tai'an, Shandong), respectively. Emperor Dezong refused. They thus prepared for war against the imperial government, and Tian and Liang Chongyi (the military governor of Shannan East Circuit (山南東道, headquartered in modern Xiangfan, Hubei)), allied to them, prepared for war as well. Tian, as Zhaoyi Circuit (昭義, the new name for Zelu Circuit), whose military governor Li Baozhen (Li Baoyu's cousin) was loyal to the imperial government and which held two prefectures close to his own capital, decided to attack Zhaoyi Circuit. He put Zhaoyi's city Linming (臨洺, in modern Handan) under siege.Zizhi Tongjian, vol. 226. Emperor Dezong sent Ma and Li Sheng to aid Li Baozhen. Ma, before his arrival in the region, sent a humble letter to Tian, to make Tian believe that Ma was fearful of him. Ma then rendezvoused with Li Baozhen and attacked Tian's subordinate Yang Chaoguang (), in charge of logistics and had his subordinate Li Ziliang () cut off a potential path for Tian to aid Yang—going as far as telling Li Ziliang, "If Tian Yue got past you, I will cut off your head!" Tian indeed tried to aid Yang, but was blocked by Li Ziliang, and Ma and Li Baozhen defeated and killed Yang. They then advanced to Linming and defeated Tian as well, forcing Tian to flee back to his capital Wei Prefecture ().Zizhi Tongjian, vol. 227.