Emperor Gaozu created him the Prince of Zhao Commandery and, in spring 621, made the general Li Jing his assistant and strategist, preparing a major assault on Liang.
After defeating the Liang general Wen Shihong (文士弘), he put Jiangling under siege, cutting off Xiao Xian's communications with the armies in the rest of his territory.
Emperor Gaozu made Li Xiaogong the commandant at Jing Prefecture (荊州, i.e., Jiangling), in charge of the former Liang territory.
In fall 623, the Tang general Fu Gongshi, who had served as the deputy of the powerful general Li Fuwei the Prince of Wu as the military governor of the lower Yangtze region, rebelled against Tang rule while Li Fuwei was at Chang'an, declaring himself the Emperor of Song.
Before his army was set to depart Xiang Prefecture, Li Xiaogong held a feast, when, for reasons unexplained, Li Xiaogong's cup, filled with water, suddenly appeared to be filled with blood, which was considered an ill omen and causing the generals at the feast to lose heart.
It was after Fu Gongshi was delivered to Danyang that Li Xiaogong began to undertake actions that historians found questionable.
As he was put in charge of the lower Yangtze region after defeating Fu, he rebuilt the important Southern Dynasties fortress of Shitou (near Danyang), which led to accusations that he was planning treason himself.
Emperor Gaozu recalled him to the capital and had him interrogated, but after insufficient evidence was shown against him, released him and made him the minister of imperial clan affairs—a high-level position that, however, had relatively little power.
It was said that Li Xiaogong lived luxuriously, having more than 100 dancing and singing girls at his mansion, but it was also said that he was humble and forgiving and therefore was honored by Emperor Taizong.
During this period, he once made a comment to friends, suggesting that he might have intentionally lived luxuriously in order to show that he did not have ambitions: In 640, Li Xiaogong died suddenly while at a feast.