In 477, after Xiao Daocheng had seized power after assassinating the violent Emperor Houfei of Liu Song and made Emperor Houfei's brother Liu Zhun emperor (as Emperor Shun), the general Shen Youzhi rose against him from Jing Province (荊州, modern central and western Hubei), and as Xiao Ze defended Penkou (湓口, in modern Jiujiang, Jiangxi) in preparation for a possible eventual attack by Shen, he made Xiao Zhangmao his assistant in reviewing the troops.
After Shen was defeated, Xiao Zhangmao initially returned to the capital Jiankang to serve under his grandfather, but subsequently was made the governor of Yong Province (雍州, modern southwestern Henan and northwestern Hubei).
When his mother Crown Princess Pei died later that year, by suggestion of the prime minister Wang Jian, Prince Zhangmao was prevented from carrying out full mourning customs for his mother, due to the importance of his post, but his defense post was moved from Shitou to the important suburb of Xizhou (西州).
In 482, he was made the governor of South Xu Province (南徐州, modern western central Jiangsu).
Despite his Buddhist beliefs, however, Xiao Zhangmao was wasteful and luxurious in his living—using many items that were appropriate only for emperors, although he was also praised as kind and hospitable.