 When Emperor Gaozu received Yuwen Shiji, he initially rebuked him, but Yuwen Shiji was able to point out that they had previously been friends and that he had offered to submit earlier.Further, Yuwen Shiji's sister was by this point Emperor Gaozu's concubine, and so Emperor Gaozu made Yuwen Shiji an official.He later served under Emperor Gaozu's son Li Shimin the Prince of Qin in defeating Liu Wuzhou the Dingyang Khan, and as a result was created his old title of Duke of Xincheng County, and was given the Princess of Shouguang County (寿光县主, a relative of Emperor Gaozu, although the relationship is not clear) as his wife.