During Tang Dynasty
It is not known when or where Xu Dexun was born. The first reference to him in historical sources was in 903, at which time he was serving under Ma Yin the military governor of Wu'an Circuit (武安, headquartered in modern Changsha, Hunan) and already described as a general. That year, when Yang Xingmi the military governor of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu) wrote Ma to impress on Ma Yang's allegations that Zhu Quanzhong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan) was bullying then-reigning Emperor Zhaozong of Tang, Ma sought advice from his aides as to Yang's proposal for Ma to cut off relations with Zhu and enter into an alliance as blood brothers with Yang. Xu pointed out that, while, just as Yang accused, Zhu was morally decrepit, but at that time, Zhu had the emperor under his control, and therefore, as Ma wished to continue to support the emperor as the basis of his rule, he should not cut off relations with Zhu. Ma agreed.
Later in 903, when Cheng Rui the military governor of Jingnan Circuit (荊南, headquartered in modern Jingzhou, Hubei) was, at Zhu's request, leading an army down the Yangtze River to try to save Du Hong the military governor of Wuchang Circuit (武昌, headquartered in modern Wuhan, Hubei), who was then under siege by Yang's general Li Shenfu, Ma sent Xu to launch a joint surprise attack on Jingnan's capital Jiangling Municipality, with Ouyang Si (歐陽思), an officer under Lei Yanwei the military governor of Wuzhen Circuit (武貞, headquartered in modern Changde, Hunan). Together, Xu and Ouyang sacked Jiangling and pillaged it of its population and wealth before withdrawing. (This led to Cheng's army's losing its morale and his subsequent defeat at Li's hands; Cheng then committed suicide.) As Xu was returning to Wu'an's capital Tan Prefecture (in modern Changsha, Hunan), he went through Yue Prefecture (岳州, in modern Yueyang, Hunan), which was then ruled by the prefect Deng Jinzhong (鄧進忠) — who was formally a subordinate of Ma's but was de facto independent. Deng held a feast for Xu, at which Xu tried to persuade him the wisdom of submitting to Ma completely. Deng agreed, and therefore took his family and followed Xu back to Tan Prefecture. Ma subsequently made Xu the prefect of Yue and Deng the prefect of Heng Prefecture (衡州, in modern Hengyang, Hunan). However, in 906, Yang Xingmi's son and successor Yang Wo sent the officer Chen Zhixin (陳知新) to attack Yue Prefecture; Chen expelled Xu and took Yue Prefecture for Huainan.
During Ma Yin's reign as Prince/King of Chu
During Later Liang
In 907, Zhu Quanzhong had Emperor Zhaozong's son and successor Emperor Ai yield the throne to him, ending Tang and starting a new Later Liang as its Emperor Taizu. He created Ma Yin the Prince of Chu, and thereafter Ma's territory was considered a separate state of Chu, as a vassal of Later Liang.
Later in 907, Yang Wo (who had refused to recognize Later Liang and whose domain now formed a state of Hongnong) sent Liu Cun (劉存), Chen Zhixin, and Liu Wei (劉威) to launch a large attack on Chu. Ma sent Qin Yanhui (秦彥暉) and Huang Fan (黃璠) to engage them. Qin and Huang defeated and captured Liu Cun and Chen, and Liu Wei fled, allowing Qin to recapture Yue Prefecture, where Xu apparently then returned, for later that year he was referred to as the prefect of Yue. At that time, Ma was sending Qin to attack Wuzhen in conjunction with Ni Kefu (倪可福), an officer sent by Gao Jichang the Later Liang military governor of Jingnan. Lei Yanwei's brother and successor Lei Yangong sought aid from Hongnong. Yang Wo sent the Ling Ye (泠業) and Li Rao (李饒) to try to save Lei Yangong, but Xu laid a trap for them on the way and captured them. (Without Hongnong aid reaching him, Lei would abandon his capital Lang Prefecture (朗州) and flee to Hongnong territory in 908.)
Meanwhile, after the joint action, Gao stationed forces at Hankou (漢口, in modern Wuhan) and blocked off Ma's tributary communication route with Later Liang. Later in 908, Ma sent Xu to attack Jingnan, reaching Shatou (沙頭, near Jiangling). Gao, in fear, sued for peace.
In 910, Ma sent Yao Yanzhang to capture Ningyuan Circuit (寧遠, headquartered in modern Yulin, Guangxi), and Pang Juzhao (龐巨昭) the military governor of Ningyuan surrendered to him, allowing Chu to take control of Ningyuan. However, in 911, Liu Yan the military governor of Qinghai Circuit (清海, headquartered in Guangzhou, Guangdong) attacked Ningyuan. Ma sent Xu, with an army of soldiers from Gui Prefecture (桂州, in modern Guilin, Guangxi), to aid Yao, but even with Xu's aid, Yao judged his position at Ningyuan's capital Rong Prefecture (容州) to be untenable, and therefore, with Xu's help, took the people and the stores at Rong and withdrew back to Chu proper, allowing Liu Yan to take Rong and Gao (高州, Maoming, Guangdong). Xu later returned to Yue Prefecture, as he was described as the prefect of Yue during an operation in 914 when the Chu officer Wang Huan (王環) launched a surprise attack against Huang Prefecture (黃州, in modern Wuhan) — a part of Wuchang, ruled by Hongnong, whose state name had been changed to Wu by this point. Wang was able to capture the Wu prefect of Huang Ma Ye (馬鄴) and pillage Huang before withdrawing, and when Xu urged caution in case the Wu garrison at Wuchang's capital E Prefecture (鄂州) would try to intercept him, Wang pointed out that the raid on Huang was carried out in surprise, such that the E garrison would not know how to react, and Wang was able to withdraw safely.
During Later Tang
In 927, by which time Later Liang had fallen to a new Later Tang, to which Ma Yin became a vassal, Gao Jichang (who had changed his name to Gao Jixing by this point) broke his vassal relationship with Later Tang. The Later Tang emperor Li Siyuan (Emperor Mingzong) thus sent the general Liu Xun (劉訓) to attack Gao, while ordering Ma to send an army as well. Ma sent Xu Dexun but had Xu's army stop at Yue Prefecture and not advance further, and ultimately did not attack Jingnan with Liu. When Liu was forced to withdraw, Gao's domain became effectively an independent state of Jingnan (also known as Nanping).
Later in 927, Li Siyuan created Ma the greater title of King of Chu, making Ma de jure the sovereign of his own domain. Ma thereafter structured his own government after the imperial government, and he made Xu and Yao Yanzhang his chancellors.
Later in 928, Wu launched a major attack on Yue Prefecture, commanded by Miao Lin (苗璘) and Wang Yanzhang (王彥章). Ma sent Xu to face them. Xu secretly sent Wang Huan with a smaller fleet to get behind the Wu fleet, and then attacked the Wu fleet from both ends. The result was a major Chu victory, and both Miao and Wang Yanzhang were captured. Subsequently, though, to try to make peace with Wu, Ma sent both Miao and Wang Yanzhang back to Wu. When sending them off at a feast, Xu, who had by this point had become concerned that Ma's sons were fighting over succession rights, made what was later viewed as a prophetic statement:
While Chu is small, its senior officials and generals are still present. I hope that the Wu Dynasty will not again think of it. For you to consider attacking us, you have to wait until the ponies [(i.e., Ma's sons, with Xu employing a double entendre given that "Ma" meant "horse")] are fighting over the stable.
Meanwhile, Gao, after breaking with Li Siyuan, submitted to Wu, and the Wu emperor Yang Pu (Yang Longyan's brother and successor) created Gao the Prince of Qin. Li Siyuan ordered Ma to attack Jingnan. Ma sent Xu and his son Ma Xifan to attack Jingnan. When the two armies met, Gao Jixing's nephew Gao Congsi (高從嗣) challenged Ma Xifan to single combat, but the Chu officer Liao Kuangqi (廖匡齊) came out and engaged Gao Congsi instead, killing him. Gao Jixing then sued for peace, and Xu and Ma Xifan withdrew. Xu was said to have died not long after the Jingnan campaign, but the exact time was unknown. Xu's son Xu Keqiong would play a major divisive role in the eventual struggle between Ma's sons Ma Xi'e and Ma Xiguang, which helped to bring Chu's downfall.